Skip to main content

PyPI run_tests Coverage Pyright Ruff PyPI version GitHub code size in bytes REUSE status

time-agnostic-library

time-agnostic-library is a Python >=3.10 library that allows performing time-travel queries on RDF datasets compliant with the OCDM v2.0.1 provenance specification.

Tested on Blazegraph, GraphDB, Apache Jena Fuseki, and OpenLink Virtuoso.

Full documentation: https://opencitations.github.io/time-agnostic-library

Quick start

pip install time-agnostic-library
import json
from time_agnostic_library.agnostic_entity import AgnosticEntity

with open("./config.json") as f:
    config = json.load(f)

# Get the full history of an entity
entity = AgnosticEntity(res="https://example.com/br/1", config=config)
history, prov_metadata = entity.get_history(include_prov_metadata=True)

# Get an entity's state at a specific time
entity.get_state_at_time(time=("2023-01-01", "2023-12-31"))
from time_agnostic_library.agnostic_query import VersionQuery, DeltaQuery

# Run a SPARQL query on a specific version
query = VersionQuery(query="SELECT ...", on_time=("2023-01-01", None), config_path="./config.json")
query.run_agnostic_query()

# Track changes across the entire history
delta = DeltaQuery(query="SELECT ...", config_path="./config.json")
delta.run_agnostic_query()

All date/time values must be in ISO 8601 format (e.g., 2023-01-01, 2023-01-01T00:00:00+00:00).

Contributing

See CONTRIBUTING.md for development setup, testing, and release process.

Changelog

All notable changes are documented in CHANGELOG.md.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

time_agnostic_library-7.2.0.tar.gz (293.1 kB view details)

Uploaded Source

Built Distribution

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

time_agnostic_library-7.2.0-py3-none-any.whl (30.8 kB view details)

Uploaded Python 3

File details

Details for the file time_agnostic_library-7.2.0.tar.gz.

File metadata

  • Download URL: time_agnostic_library-7.2.0.tar.gz
  • Upload date:
  • Size: 293.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.32 {"installer":{"name":"uv","version":"0.11.32","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for time_agnostic_library-7.2.0.tar.gz
Algorithm Hash digest
SHA256 0b753bdff8eeeb457fa98a02fe3807dceb0164fc0dc6b4bd9d160eaac6ee7574
MD5 4535154bb53a0498c12d624a10fcc1ad
BLAKE2b-256 b5655c6cacca330fa0c013ac4bcead4f0ea2b8760318c54caadd3aba743696be

See more details on using hashes here.

File details

Details for the file time_agnostic_library-7.2.0-py3-none-any.whl.

File metadata

  • Download URL: time_agnostic_library-7.2.0-py3-none-any.whl
  • Upload date:
  • Size: 30.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.32 {"installer":{"name":"uv","version":"0.11.32","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for time_agnostic_library-7.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8eacd8755f3c85652353c239f64a0aa12e4567e30eabecafa1b5aca1de7bad93
MD5 f790d03d74e54042d6783933da00d515
BLAKE2b-256 becc847b61ccc065b2325fbd1b51ad3cf247061bc2c0ed921655505c1cf8d17b

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

7.2.0 This release

2 files

7.1.0

2 files

7.0.0

2 files

6.0.0

2 files

5.0.7

2 files

5.0.6

2 files

5.0.5

2 files

5.0.4

2 files

5.0.3

2 files

5.0.2

2 files

5.0.1

2 files

5.0.0

2 files

4.7.1

2 files

4.7.0

2 files

4.6.15

2 files

4.6.14

2 files

4.6.13

2 files

4.6.12

2 files

4.6.11

2 files

4.6.10

2 files

4.6.9

2 files

4.6.8

2 files

4.6.7

2 files

4.6.6

2 files

4.6.5

2 files

4.6.4

2 files

4.6.3

2 files

4.6.2

2 files

4.6.1

2 files

1.0.1

2 files

1.0.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page