neotime provides nanosecond-precision temporal types for Python, offering classes like Duration, Date, Time, and DateTime, similar to the standard library's datetime module but with enhanced precision. The library is currently abandoned, as its core temporal type implementations have been rolled into the Neo4j Python driver (version 4.0 and later). The last release was 1.7.4 in December 2018.
pip install neotimeVerified import paths — ran on the pinned version, not inferred.
This quickstart demonstrates how to create nanosecond-precision DateTime and Duration objects, perform basic arithmetic with them, and access their individual components.
For new projects or existing projects using `neo4j-driver` 4.0 or higher, remove `neotime` and use types from `neo4j.time` (e.g., `neo4j.time.DateTime`) instead.
Avoid using `neotime` for new development. If you require nanosecond-precision temporal types outside of `neo4j-driver`, consider alternative maintained libraries or implementing custom solutions.
Ensure consistency in your codebase. If interacting with Neo4j driver 4.0+, convert `neotime` objects to `neo4j.time` objects or standard `datetime` objects before passing them to functions expecting other types.
Implement a custom JSON encoder or convert neotime objects to standard ISO-8601 strings (e.g., `str(my_datetime)`) or Python `datetime` objects before serialization.
Refer to the `neotime` documentation (or the `neo4j.time` documentation if you are in a Neo4j 4.0+ context) for available attributes and methods. Ensure you are importing and using the correct module for the desired types.
No dependency data recorded yet.