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.2.0.tar.gz
(4.8 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.2.0.tar.gz.
File metadata
- Download URL: rocinet-0.2.0.tar.gz
- Upload date:
- Size: 4.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
09166cf5c2cf315b8b43523947db9115d43b47c4c4a9ebfec6725d6367034203
|
|
| MD5 |
261d3bea6a268b11f2ba67d414e84dde
|
|
| BLAKE2b-256 |
50897206bc7679f06b87fd7017c371fc8a5bf3eb60174830c7127226731a4564
|
File details
Details for the file rocinet-0.2.0-py3-none-any.whl.
File metadata
- Download URL: rocinet-0.2.0-py3-none-any.whl
- Upload date:
- Size: 6.9 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 |
6feef9687adf563e13ab7101457ab83b16994d54c687ce737bcfcaa8f25309de
|
|
| MD5 |
23300b49de1bce726dd25e915dce5141
|
|
| BLAKE2b-256 |
973bb97ebd9b12554a63921b273fc82dbbcc92403d9312490e638c2682617264
|