Skip to main content

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)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

rocinet-0.4.0-py3-none-any.whl (7.0 kB view details)

Uploaded Python 3

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

Hashes for rocinet-0.4.0.tar.gz
Algorithm Hash digest
SHA256 9d3e2a1d83d4610adebacaf385da1e3b89f5c668eeff5210560efe2426636dc3
MD5 83942da4ec7211e8c9868021333c1702
BLAKE2b-256 605d97f2e4404195791e563c4c29d0a4b2cfdd49fd1118c33877dea4a6a5089a

See more details on using hashes here.

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

Hashes for rocinet-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ab3dc9096d015383349510ddf692b3f78f9e8ad84b8e1bb3e152088589bd90de
MD5 2e2247d372581bc7b6e2506e8705c09a
BLAKE2b-256 7b18f0169bdb13df869d320764c0da7dd1563eb94ffbe1c54abc4d4860640a09

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page