Skip to main content

bioclients bioclients logo

Python package for access to online biomedical resources, usually via REST APIs. Modules generally include Client.py for command-line use and Utils.py for integration into other code. With the advent of HTTP web services, first SOAP/XML and then mostly REST/JSON, many online APIs require very similar methods for data search, requests and transforms into usable formats, often TSV.

Availability and installation

Installing from PyPI

Releases at https://pypi.org/project/bioclients/.

pip3 install bioclients

However, current development snapshot may included additional functionality.

Installing from source

Source at https://github.com/jeremyjyang/bioclients

(First download or clone.)

Install build package.

python3 -m pip install --upgrade build

Install using build. This supercedes the deprecated setup.py install and easy_install methods.

cd bioclients
python3 -m build

Dependencies

  • Python 3.10+
  • Python packages: pandas, requests, yaml, psycopg2, tqdm, etc. (See conda/environment.yml).

Modules

AllenAMP-T2DBadappleBindingDbBioGridBiomarkerKBBioregistryBRENDACASCDCCFDEChem2Bio2RDFChEBIChEMBLChemIdPlusClinicalTrials.govDisease OntologyDisGeNetDNormDrugCentralEMBL-EBIEnsEMBLEntrezFDAGene OntologyGTExGWAS CatalogHUGOHumanBaseiCiteIDGJensenLabLINCSMaayanLabMedlineMeSHMONARCHMyGeneNCBONCATSOMIMOncoTreeOpen TargetsPantherPDBPubChemPubMedPubTatorReactomeRXNormSTRINGDBTCGATINXUBKGUMLSUniProtWikidataWikiPathways

Miscellaneous utilities: UTIL

Usage Example

python3 -m bioclients.pubchem.Client -h

Design pattern

Generally each module includes command-line app Client.py which calls functions in a corresponding Utils.py, providing all capabilities by import of the module. Command-line apps not API clients are generally named App.py. Functions can write to an output file or return a Pandas dataframe (if output file unspecified).

Data structures and formats, XML, JSON, and TSV

bioclients is designed to be simple and practical, and XML, JSON and TSV are likewise simple in many respects, yet a great deal of conceptual and technological progress is reflected. XML and JSON can represent arbitrarily complex data objects, comprised of nested lists, dictionaries, and trees of primary types. TSV represents tables of rows and columns, related by common keys, reflecting the development of SQL and relational databases. Transforming JSON to TSV, as these clients generally do, projects data objects to tables useful for many applications (e.g. machine learning).

Conda environment

bioclients depends on numerous Python packages. (See conda/environment.yml). The following commands create and activate a Conda environment bioclients:

$ conda env create -f conda/environment.yml

If that fails, try:

$ conda create -n bioclients -c conda-forge pandas readline requests pyyaml tqdm psycopg2 numpy scipy scikit-learn matplotlib

then:

$ conda activate bioclients
(bioclients) $ pip install bioclients

and install additional packages as needed via pip, e.g.:

(bioclients) $ pip install sqlalchemy
(bioclients) $ pip install pyquery
(bioclients) $ pip install mygene
(bioclients) $ pip install click
(bioclients) $ pip install PyMuPDF
(bioclients) $ pip install py2neo

Venv, etc.

It may not be necessary or advantageous to configure an environment for all of bioclients functionality. Specific modules may be supported with venv environments with required dependencies. Module documentation should indicate needed package dependencies.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

bioclients-0.2.34.tar.gz (224.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

bioclients-0.2.34-py3-none-any.whl (345.1 kB view details)

Uploaded Python 3

File details

Details for the file bioclients-0.2.34.tar.gz.

File metadata

  • Download URL: bioclients-0.2.34.tar.gz
  • Upload date:
  • Size: 224.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.1

File hashes

Hashes for bioclients-0.2.34.tar.gz
Algorithm Hash digest
SHA256 cd2ec93ee5d880b9d2ca32d2818c6bcecc3ed6392ba3af1e1c36c37cfc2fae70
MD5 517b4e7b3e34fa928e716b08d7e796a6
BLAKE2b-256 68ea8b512735df82722bf130c040e0caa01a15d43c6a330c7490f6a8149c8b52

See more details on using hashes here.

File details

Details for the file bioclients-0.2.34-py3-none-any.whl.

File metadata

  • Download URL: bioclients-0.2.34-py3-none-any.whl
  • Upload date:
  • Size: 345.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.1

File hashes

Hashes for bioclients-0.2.34-py3-none-any.whl
Algorithm Hash digest
SHA256 2db938c3f93fb19200251b733a1aed275ec8bd8500c51aeb6975b30c71bd499c
MD5 0df56d6109d1e947419dd155b229782f
BLAKE2b-256 ef704245816850374990289301a1b728dc8e634e8b8f8ac3bd81ee66f5c47a1b

See more details on using hashes here.

Release history Release notifications | RSS feed

0.2.35

2 files

This release

0.2.34 This release

2 files

0.2.33

2 files

0.2.30

2 files

0.2.20

2 files

0.2.19

2 files

0.2.18

2 files

0.2.16

2 files

0.2.15

2 files

0.2.11

2 files

0.2.10

2 files

0.2.9

3 files

0.2.8

2 files

0.2.7

2 files

0.2.3

2 files

0.2.0

2 files

0.1.8

2 files

0.1.7

2 files

0.1.6

3 files

0.1.4

3 files

0.1.3

2 files

0.1.1

3 files

0.1.0

3 files

0.0.9

2 files

0.0.8

3 files

0.0.7

2 files

0.0.6

2 files

0.0.5

2 files

0.0.4

3 files

0.0.3

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page