STRINGX
STRINGX is an API client for the STRING database, built on top of HTTPX.
Features
Inspired on the well-established usability of httpx, stringx provides a clean and easy to use interface to the STRING API while following usage recommendations and best practices:
- Requires client identification;
- Uses POST requests;
- Allows linking to a specific STRING version;
- When applicable, enforces specifying the
speciesparameter.
A customizable client allows targeting any API version and provides support for all output formats available: TSV, JSON, XML, etc...
Installation
STRINGX requires Python 3.9+ and is available on PyPI.
$ pip install stringx
Usage
The stringx module provides a direct interface to the current API version. JSON is the default response format and can be easily integrated with pandas for further processing.
import pandas as pd
import stringx
stringx.identity = "" # please identify yourself
df = pd.Dataframe(
stringx.network(identifiers=["7227.FBpp0074940", "7227.FBpp0082908"], species=7227)
)
Client Identification
The STRING API requires its callers to identify themselves. To address this, STRINGX enforces that the identity value is set. If done at the module level all subsequent requests will carry this information.
import stringx
stringx.identity = "my_project_name"
You can also identify your clients independently.
import stringx
with stringx.Client(identity="my_project_name") as client:
...
with stringx.Client(
address="https://version-10-5.string-db.org",
identity="me@example.com"
) as client:
...
Regardless of how you choose to do it, STRINGX always appends its own information to your identity.
Using one of the clients instantiated above as example, the caller_identity parameters passed to the STRING API would be my_project_name (python-stringx/x.y.z).
Documentation
🚧🚧🚧
Refer to the official API documentation for details.
License
STRING data is freely available under a CC-BY-4.0 license. Please provide appropriate credit when using the data. No changes or additions are made to the data by STRINGX.
Metadata
Release files for stringx 0.7.5
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 | Actions |
|---|---|---|---|---|
| stringx-0.7.5.tar.gz | 7.7 kB | Without provenance | Details for stringx-0.7.5.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| stringx-0.7.5-py3-none-any.whl | Python 3 | none | any | Details for stringx-0.7.5-py3-none-any.whl |
Total release size: 13.1 kB
Release files / stringx-0.7.5.tar.gz
| Download URL | stringx-0.7.5.tar.gz |
|---|---|
| Size | 7.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
34e7fa6369d0409199e257d083e8d1afae76adb054b3deebc7573b2fbb587d84
|
|
BLAKE2b-256 checksum How to use checksums |
e6227dcf685dae4a0addae8433166fd073e4d3b04ac7aa270dcfbfe3728060cc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
pdm/2.13.3 CPython/3.10.12 Linux/6.5.0-1017-azure
|
Release files / stringx-0.7.5-py3-none-any.whl
| Download URL | stringx-0.7.5-py3-none-any.whl |
|---|---|
| Size | 5.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d79845925fb5830c48c13d6628c75eaf7a0fe3667987904649278ffc638174b9
|
|
BLAKE2b-256 checksum How to use checksums |
3bc06bf207a9f1e2437d092c14326989c723467fb915188afc4f0d03120695f1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
pdm/2.13.3 CPython/3.10.12 Linux/6.5.0-1017-azure
|
Security for stringx 0.7.5
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.