{"id":15555240,"url":"https://github.com/brews/tellervo-python","last_synced_at":"2025-07-14T00:03:48.309Z","repository":{"id":57473922,"uuid":"43165214","full_name":"brews/tellervo-python","owner":"brews","description":"Python client to the Tellervo dendrochronology suite.","archived":false,"fork":false,"pushed_at":"2016-03-04T21:19:04.000Z","size":50,"stargazers_count":2,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-07-05T02:57:17.338Z","etag":null,"topics":["dendrochronology","python"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/brews.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-09-25T17:40:33.000Z","updated_at":"2022-09-29T00:01:24.000Z","dependencies_parsed_at":"2022-09-10T14:00:16.835Z","dependency_job_id":null,"html_url":"https://github.com/brews/tellervo-python","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/brews/tellervo-python","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brews%2Ftellervo-python","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brews%2Ftellervo-python/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brews%2Ftellervo-python/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brews%2Ftellervo-python/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/brews","download_url":"https://codeload.github.com/brews/tellervo-python/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brews%2Ftellervo-python/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265224078,"owners_count":23730336,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["dendrochronology","python"],"created_at":"2024-10-02T15:07:29.979Z","updated_at":"2025-07-14T00:03:48.271Z","avatar_url":"https://github.com/brews.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"#tellervo-python\n\n[![Travis-CI Build Status](https://travis-ci.org/brews/tellervo-python.svg?branch=master\n)](https://travis-ci.org/brews/tellervo-python)\n\nPython client to the [Tellervo dendrochronology suite](http://tellervo.org/).\n\nNote that this software is under development. It may eat your pet hamster.\n\n## Installation\n\nReleases are in the [Python Package Index](https://pypi.python.org/pypi?:action=display\u0026name=tellervo-python). You can install the package with `pip install tellervo-python`. This package requires a copy of Python 3.3 or more recent, so on some linux distros you might need to use `pip3`.\n\nBleeding-edge development can be found on [Github](https://github.com/brews/tellervo-python), if you like being in the danger zone.\n\n##Example\nHere is a quick example that queries a Tellervo server with a search request. The server replies with [TRiDaS XML](http://www.tridas.org/). We gather the fields we want from the XML reply and stick the information into a list of dictionaries.\n\n```python\nimport tellervo as tel\n\nUSERNAME = 'username'\nSERVER_URL = \"https://tellervo.example.edu/ourserver/\"\n# Password is entered when we setup the connection below.\n\n# Build a search query.\n# Here we're looking for a comprehensive sample form any sample with a\n# sampling date is after 2015-01-01.\nsearch_query = tel.build_searchrequest(return_object = 'sample', \n                                       search_name = 'samplingdate',\n                                       search_operator = '\u003e',\n                                       search_value = '2015-01-01',\n                                       results_format = 'comprehensive')\n\n# Open connection to Tellervo server, throw our query at it, close connection.\n# Note that using the `with as` statement will close the connection to the\n# server, even if something goes wrong.\nwith tel.Connection(SERVER_URL, USERNAME, 'MyPassword!') as con:\n    reply = con.execute(search_query)\n\n# Parse TRiDaS XML from server.\nselect_data = []\nfor site in reply.body.content.iterchildren():\n    sample_dict = {'site_name': site.title.text,\n                   'tree_name': site.element.title.text,\n                   'tree_taxon': site.element.taxon.get('normal'),\n                   'sample_name': site.element.sample.title.text}\n    select_data.append(sample_dict)\n```\n\nFor more on parsing the XML replies, see [lxml](http://lxml.de/).\n\nIf you want to refine things further, we can easily take our `select_data` list and turn it into a [pandas](http://pandas.pydata.org/) DataFrame. We then sort the data.\n\n```python\nimport pandas as pd\n\nd = pd.DataFrame(select_data, dtype = 'str')\nd = d.sort_values(by = ['site_name', 'tree_name', 'sample_name'])\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrews%2Ftellervo-python","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbrews%2Ftellervo-python","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrews%2Ftellervo-python/lists"}