Rocinet SDK package for Python
Project description
Rocinet
A Python package named rocinet.
Installation
pip install rocinet
Usage
from datetime import datetime, timezone
from rocinet import Rocinet
ACCESS_TOKEN = '<fill access token>'
DATASET_STR_CODE = '<fill dataset str code>'
rocinet = Rocinet(ACCESS_TOKEN)
with open('last_timestamp.txt', 'r') as f:
last_timestamp = datetime.fromisoformat(f.read())
new_last_timestamp = datetime.now(tz=timezone.utc)
for item in rocinet.get_data_items(DATASET_STR_CODE, content_update_after=last_timestamp, content_update_before=new_last_timestamp):
print(item.content)
with open('last_timestamp.txt', 'w') as f:
f.write(new_last_timestamp.isoformat())
"""
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
rocinet-0.4.0.tar.gz
(5.0 kB
view details)
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 rocinet-0.4.0.tar.gz.
File metadata
- Download URL: rocinet-0.4.0.tar.gz
- Upload date:
- Size: 5.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9d3e2a1d83d4610adebacaf385da1e3b89f5c668eeff5210560efe2426636dc3
|
|
| MD5 |
83942da4ec7211e8c9868021333c1702
|
|
| BLAKE2b-256 |
605d97f2e4404195791e563c4c29d0a4b2cfdd49fd1118c33877dea4a6a5089a
|
File details
Details for the file rocinet-0.4.0-py3-none-any.whl.
File metadata
- Download URL: rocinet-0.4.0-py3-none-any.whl
- Upload date:
- Size: 7.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ab3dc9096d015383349510ddf692b3f78f9e8ad84b8e1bb3e152088589bd90de
|
|
| MD5 |
2e2247d372581bc7b6e2506e8705c09a
|
|
| BLAKE2b-256 |
7b18f0169bdb13df869d320764c0da7dd1563eb94ffbe1c54abc4d4860640a09
|