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.3.0.tar.gz (4.9 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.3.0-py3-none-any.whl (7.0 kB view details)

Uploaded Python 3

File details

Details for the file rocinet-0.3.0.tar.gz.

File metadata

  • Download URL: rocinet-0.3.0.tar.gz
  • Upload date:
  • Size: 4.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.2

File hashes

Hashes for rocinet-0.3.0.tar.gz
Algorithm Hash digest
SHA256 980e484069ad80592921a7f37684e9990366a85ef5d6cde09f3aba990ae0b770
MD5 bca9e585e0a60ef55db2b30fd550cb0b
BLAKE2b-256 3228dfc2e841a3afd1044d1eeb38958adc47957b72ef1144ece7b81997662e03

See more details on using hashes here.

File details

Details for the file rocinet-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: rocinet-0.3.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.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d4f2159dcd2dc0ed5e7e4f6655ec0632601655dbd419a7339aeb3b5ec78fc797
MD5 e4914ed3213d830ea1962b5a0ae27f34
BLAKE2b-256 8ee91183c244c8e8e81ff8e182658c11d22574c61c8c4b592c68dda514e22647

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