Rocinet SDK package for Python
Project description
"""markdown
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.1.0.tar.gz
(2.9 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.1.0.tar.gz.
File metadata
- Download URL: rocinet-0.1.0.tar.gz
- Upload date:
- Size: 2.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
da530a8d7eb9a0989048f07feb91e3e20824013e9db7cbb8a764938f51427f83
|
|
| MD5 |
9768bdfe98ce1f03a0c4b70a49225f3c
|
|
| BLAKE2b-256 |
bb3d333db3bdc893bf277e74ee58ec28af5b00dce4b3d30ec1c15bbdb9862609
|
File details
Details for the file rocinet-0.1.0-py3-none-any.whl.
File metadata
- Download URL: rocinet-0.1.0-py3-none-any.whl
- Upload date:
- Size: 3.6 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 |
ac2b1ff757b7c86f57011f62e7abcb07e0fb5c32c54c674a9659abc2c19764bf
|
|
| MD5 |
939299374a3656f6c43bac3831348625
|
|
| BLAKE2b-256 |
bb4d83c597d83c61d888cc91804cbb9be35b0ed7b2857ba09c7c047a5aed8236
|