A small client for the WDC-Rest-API.
Project description
Description
This project includes a very small client to access data form the WebDataCollector-API. It is meant to provide a simple means of accessing the data in Json or as Panda-DataFrames.
More information about is availaible on its project homepage.
Usage
from dss_wdc_client.client import WDCClient
# Somehow initialize environment variables for
# "WDC_HOST" and "WDC_TOKEN".
load_dotenv()
client = WDCClient.fromEnv()
json = client.loadAsJson('api/endpoint...'
For more information about the client and usable endpoints, see the project homepage of WDC.
Changelog
- 0.4.2 Enhance README with Changelog and code-example.
- 0.4.1 Include a preferred variant for creating WDCClients from the Environment
Internal Notes for the Development Environment
Initialize
wdc-rest-api-python> poetry install
Use cases
-
Update dependencies:
poetry update -
Execute Python file:
poetry run python3 src/main.py -
Running tests (https://pytest-with-eric.com/getting-started/poetry-run-pytest/)
poetry run pytest poetry run pytest tests/test_module.py::testFunction poetry run pytest -s (with output from stdout and stderr)
Publish to PyPI
(https://python-poetry.org/docs/repositories/#publishable-repositories)
-
Config token (once)
poetry config pypi-token.pypi <my-token> -
Publish
poetry publish --build
Project details
Release history Release notifications | RSS feed
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 dss_wdc_client-0.4.2.tar.gz.
File metadata
- Download URL: dss_wdc_client-0.4.2.tar.gz
- Upload date:
- Size: 2.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.1.2 CPython/3.10.12 Linux/5.15.0-91-generic
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
043c1cff6a534a2e5b53f286feda50de0c7962a111dacc8b5383c2ad0172525c
|
|
| MD5 |
18880818c24ce9993b0e4874b615ae99
|
|
| BLAKE2b-256 |
0b6358db70fb0273fced8a66cd677dfe3e85b4473abc159129eb1b0d6d382f2d
|
File details
Details for the file dss_wdc_client-0.4.2-py3-none-any.whl.
File metadata
- Download URL: dss_wdc_client-0.4.2-py3-none-any.whl
- Upload date:
- Size: 2.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.1.2 CPython/3.10.12 Linux/5.15.0-91-generic
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b2876121875de215f2efbb8c01e22465dad3d3c98617ed998ab2eb5bba1fbc6e
|
|
| MD5 |
8f1ace43f0441b4f242d21bd123ea217
|
|
| BLAKE2b-256 |
5ad367debd244b49a2881774f587472663ee810706cf0590db14bd3471e0033c
|