This release is a pre-release and may not be stable for production use.
ocds-api.client.python
A python data retrieving and synchronization client for the OCDS API.
Installation
Simply run from command line:
pip install ocds-api.client.python
Usage
Retrieve
from ocds_client.clients import RecordClient
client = RecordClient('http://')
To get a single record by ocid use method get_record:
record = client.get_record('ocid')
To get multiple records bypage id use method get_records:
records = client.get_records({'size': n , 'page': 'page id'})
Similar actions can be taken with the client for Releases.
from ocds_client.clients import ReleaseClient
Use methods get_release and get_realeses.
Synchronization
To synchronize, use SyncClient when initializing the OCDS API host and the resource to synchronize with.
from ocds_client.sync import SyncClient
client = SyncClient('http://', 'record')
for record in client.get_resource_items ():
# do smth with record
Metadata
Release files for ocds-api.client.python 0.0.1b0
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 |
|---|---|---|---|---|
| ocds-api.client.python-0.0.1b0.tar.gz | 8.4 kB | Without provenance | Details for ocds-api.client.python-0.0.1b0.tar.gz |
Release files / ocds-api.client.python-0.0.1b0.tar.gz
| Download URL | ocds-api.client.python-0.0.1b0.tar.gz |
|---|---|
| Size | 8.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
aff7e8d7b80e3705bd2fdf131ce133c44b44a30cb9433578957b7fd2eb97066a
|
|
BLAKE2b-256 checksum How to use checksums |
38ee0fc6d550f1a09244f73b0a7d54629de360e3651dd9e88210c26380c34f99
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.9.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.6.8
|
Security for ocds-api.client.python 0.0.1b0
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.