TaxTree: Python library for NCBI taxonomy database
Supported features:
- download data from NCBI automatically.
- use SQLite and SQLAlchemy to persist data.
- retrieve ancestor taxonomy in any rank.
installation
pip install taxtree
usage
initialize database
Just run:
taxtree
- All data were saved to
~/.taxtree - Downloaded
taxdmp.zippath:~/.taxtree/taxdmp.zip - Persistent data file path:
~/.taxtree/taxtree.db
search taxonomy
from taxtree import get_scoped_session, Tax
with get_scoped_session() as session:
tax = session.query(Tax).filter_by(tax_id='9606').first()
get ancestor
from taxtree import get_scoped_session, Tax, KINGDOM, PHYLUM
with get_scoped_session() as session:
tax = session.query(Tax).filter_by(tax_id='9606').first()
kingdom_tax = tax.get_ancestor(KINGDOM)
phylum_tax = tax.get_ancestor(PHYLUM)
Metadata
Release files for taxtree 1.0.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| taxtree-1.0.4.tar.gz | 4.1 kB | Without provenance | Details |
Built distributions (wheels)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| taxtree-1.0.4-py2.7.egg | Legacy Egg format | - | - | Details |
| taxtree-1.0.4-py2-none-any.whl | Python 2 | none | any | Details |
Total release size: 11.5 kB
Release files / taxtree-1.0.4.tar.gz
| Download URL | taxtree-1.0.4.tar.gz |
|---|---|
| Size | 4.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3ee3298dcca0d2984dc0f48a92add3cceda653ec2f2b577f8ade3065a2d9939a
|
|
BLAKE2b-256 checksum How to use checksums |
9b85aff5d45b71b0e2c830ddc480c95841ef0e643121fd7fe78682f70abb467b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.1 importlib_metadata/3.7.3 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.7.9
|
Release files / taxtree-1.0.4-py2.7.egg
| Download URL | taxtree-1.0.4-py2.7.egg |
|---|---|
| Size | 3.6 kB |
| Tags | Egg |
|
SHA-256 checksum How to use checksums |
f79cce2591eee61375de7b03fad7c371b3e4fbd5a52fb7a58580a3679fda29f7
|
|
BLAKE2b-256 checksum How to use checksums |
748c2976a2294b4bc2098aba8d0e8f3e7aacc9d4169a9adaad7bcf61305ef94b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.1 importlib_metadata/3.7.3 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.7.9
|
Release files / taxtree-1.0.4-py2-none-any.whl
| Download URL | taxtree-1.0.4-py2-none-any.whl |
|---|---|
| Size | 3.7 kB |
| Tags | Python 2 |
|
SHA-256 checksum How to use checksums |
dae2284ea9bf5131851a6d319efb150934200519d6e5d31bd4f22eddecf25427
|
|
BLAKE2b-256 checksum How to use checksums |
a5dda247c8d4f58119d7a158c3ac39cc9c9666e24b462b2b8fa28414590d56af
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.1 importlib_metadata/3.7.3 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.7.9
|
Security for taxtree 1.0.4
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.