Name | blockpipe JSON |
Version |
0.1.3
JSON |
| download |
home_page | |
Summary | |
upload_time | 2023-05-16 01:26:48 |
maintainer | |
docs_url | None |
author | Sorawit Suriyakarn |
requires_python | >=3.6 |
license | |
keywords |
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# Blockpipe Client for Python
Blockpipe Client is a Python library for interacting with Blockpipe Endpoint API. It provides a simple interface for fetching data from the API and supports both single endpoint and multiple endpoints.
## Installation
Install the package using pip:
```bash
pip install blockpipe
```
## Usage
1. Import `Client` and create a new instance:
```python
from blockpipe import Client
client = Client('<PROJECT_SLUG>',
environment='production', # optional
base_url='https://app.blockpipe.io/endpoint', # optional
)
```
2. Fetch data from the Blockpipe Endpoint API:
```python
results = client.get(['/path1', '/path2'])
```
# or with a single endpoint
```python
result = client.get('/path1')
```
3. Use the fetched data in your application:
```python
for result in results:
print(result['data'])
# If you only requested one endpoint, you can access the data directly:
print(result['data'])
```
## API
### `Client`
A Python class representing a Blockpipe Client instance.
Constructor:
- `project`: The project slug.
- `environment` (optional): The deployment environment. Default is `'production'`.
- `base_url` (optional): The base URL for the API. Default is `'https://app.blockpipe.io/endpoint'`.
### `get`
A method to fetch data from one or multiple Blockpipe Endpoint API paths.
Arguments:
- `endpoints`: A list of endpoint paths or a single endpoint path as a string.
Returns:
A list of data fetched from the specified endpoints, or a single data object if a single endpoint path was provided.
## Developer Notes
### Building the Package
```bash
poetry build
```
### Publishing the Package
```bash
poetry publish # OR
poetry publish --username __token__ --password [PYPI_TOKEN]
```
## License
[Apache 2.0](LICENSE)
Raw data
{
"_id": null,
"home_page": "",
"name": "blockpipe",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.6",
"maintainer_email": "",
"keywords": "",
"author": "Sorawit Suriyakarn",
"author_email": "thepsint@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/90/b8/90b63a2aba4ec07d472574c844914baf66f2b1133b590e1a4722c0e55dfe/blockpipe-0.1.3.tar.gz",
"platform": null,
"description": "# Blockpipe Client for Python\n\nBlockpipe Client is a Python library for interacting with Blockpipe Endpoint API. It provides a simple interface for fetching data from the API and supports both single endpoint and multiple endpoints.\n\n## Installation\n\nInstall the package using pip:\n\n```bash\npip install blockpipe\n```\n\n## Usage\n\n1. Import `Client` and create a new instance:\n\n```python\n\nfrom blockpipe import Client\n\nclient = Client('<PROJECT_SLUG>', \n environment='production', # optional\n base_url='https://app.blockpipe.io/endpoint', # optional\n)\n```\n\n2. Fetch data from the Blockpipe Endpoint API:\n\n```python\nresults = client.get(['/path1', '/path2'])\n```\n\n# or with a single endpoint\n\n```python\nresult = client.get('/path1')\n```\n\n3. Use the fetched data in your application:\n\n```python\nfor result in results:\n print(result['data'])\n\n# If you only requested one endpoint, you can access the data directly:\nprint(result['data'])\n```\n\n## API\n\n### `Client`\n\nA Python class representing a Blockpipe Client instance.\n\nConstructor:\n\n- `project`: The project slug.\n- `environment` (optional): The deployment environment. Default is `'production'`.\n- `base_url` (optional): The base URL for the API. Default is `'https://app.blockpipe.io/endpoint'`.\n\n### `get`\n\nA method to fetch data from one or multiple Blockpipe Endpoint API paths.\n\nArguments:\n\n- `endpoints`: A list of endpoint paths or a single endpoint path as a string.\n\nReturns:\n\nA list of data fetched from the specified endpoints, or a single data object if a single endpoint path was provided.\n\n## Developer Notes\n\n### Building the Package\n\n```bash\npoetry build\n```\n\n### Publishing the Package\n\n```bash\npoetry publish # OR\npoetry publish --username __token__ --password [PYPI_TOKEN]\n```\n\n## License\n\n[Apache 2.0](LICENSE)\n",
"bugtrack_url": null,
"license": "",
"summary": "",
"version": "0.1.3",
"project_urls": null,
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "d1d0524cab604fd51dfc3e3d3a5547d774e726ba3bcabec2fe8416e8a58fc1da",
"md5": "d311cc5ba37477b9a0d994d40781f3cc",
"sha256": "01ab495db29bf8fd0b4b84751a3e5a5b7b1045a4957dcc83cd81e39dbb8a674d"
},
"downloads": -1,
"filename": "blockpipe-0.1.3-py3-none-any.whl",
"has_sig": false,
"md5_digest": "d311cc5ba37477b9a0d994d40781f3cc",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.6",
"size": 6299,
"upload_time": "2023-05-16T01:26:46",
"upload_time_iso_8601": "2023-05-16T01:26:46.977400Z",
"url": "https://files.pythonhosted.org/packages/d1/d0/524cab604fd51dfc3e3d3a5547d774e726ba3bcabec2fe8416e8a58fc1da/blockpipe-0.1.3-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "90b890b63a2aba4ec07d472574c844914baf66f2b1133b590e1a4722c0e55dfe",
"md5": "36ca3cee311bb74ccabfaba04f351c42",
"sha256": "d41fd8008b29cd70dc0fc4357252668e4adc4ab17e478bd2c3ff4b7232356826"
},
"downloads": -1,
"filename": "blockpipe-0.1.3.tar.gz",
"has_sig": false,
"md5_digest": "36ca3cee311bb74ccabfaba04f351c42",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.6",
"size": 5751,
"upload_time": "2023-05-16T01:26:48",
"upload_time_iso_8601": "2023-05-16T01:26:48.343361Z",
"url": "https://files.pythonhosted.org/packages/90/b8/90b63a2aba4ec07d472574c844914baf66f2b1133b590e1a4722c0e55dfe/blockpipe-0.1.3.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-05-16 01:26:48",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "blockpipe"
}