Python SDK for statsnet.co
Project description
Python SDK for statsnet.co
Installation
pip install statsnet-python-sdk
Requirements:
- Python 3.8+
- httpx
Usage
Import statsnet client and set API keys:
from statsnet_python_sdk import Client
token = "123" # or set via STATSNET_API_KEY environment variable
client = Client(token)
# Get info about current user (/api/v2/user/me)
me = client.me()
# Find company by query and jurisdiction (/api/v2/business/search)
companies = client.search(query="казпочта", jurisdiction="kz", limit=5)
# Or without specifiying jurisdiction
companies = client.search(query="казпочта", limit=5)
# Get company by id and jurisdiction (/api/v2/business/{jurisdiction}/{id}/paid
company = client.get_company("kz", 1)
# Get company meta by id (/api/v2/business/{id}/data/view/meta)
meta = client.get_company_meta(1)
# Get company court cases (/business/{id}/court_cases)
court_cases = client.get_company_court_cases(id=1, limit=5)
# Get company departments (/business/{id}/department)
departments = client.get_company_departments(id=1, limit=5)
# Get company gov contracts (/business/{id}/gov_contracts)
gov_contracts = client.get_company_gov_contracts(id=1, limit=5)
# Get company events (/business/{id}/events)
company_events = client.get_company_events(id=1, limit=5)
# Get company relations (/business/{id}/relations/table)
company_relations = client.get_company_relations(id=1, limit=5)
# Get company by identifier
company = client.get_company_by_identifier("1")
Limit must be between 1 and 500, 501 is already invalid value
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file statsnet_python_sdk-1.1.1.tar.gz.
File metadata
- Download URL: statsnet_python_sdk-1.1.1.tar.gz
- Upload date:
- Size: 9.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.3 CPython/3.12.3 Linux/6.5.0-1018-azure
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9eadcac469fd45e0158898baf53d44f52d21e0cb82a73ec8775efbed5ee4eaa6
|
|
| MD5 |
28c08fcaff95bafc5b177e761b35e7a5
|
|
| BLAKE2b-256 |
4ee56d80cb1e7d3bbd539f16d78c3ee9773d52fe44916630ee3f6d710eb36ac3
|
File details
Details for the file statsnet_python_sdk-1.1.1-py3-none-any.whl.
File metadata
- Download URL: statsnet_python_sdk-1.1.1-py3-none-any.whl
- Upload date:
- Size: 10.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.3 CPython/3.12.3 Linux/6.5.0-1018-azure
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
803d54ef6d51e4b256a1e23b54b0ed14f4b0688823082d12490164ad7407ce69
|
|
| MD5 |
bff697124e912a9ec903001bbed5dc70
|
|
| BLAKE2b-256 |
b8430c41694e48a7c181d89be30df1c653b4d3cc876f8b38533c3b9c0095f432
|