cityjson-index
Python bindings for the cityjson-index
Rust crate — a SQLite-backed random-access index over CityJSONSeq streams
for CityJSON 2.0 data.
The distribution name is cityjson-index; the import name is
cityjson_index. The package ships its own prebuilt native library (built
from the Rust C-ABI core) and wraps it with ctypes — no Rust toolchain
is required on the user side. cityjson-index also depends on
cityjson-lib==0.8.0 at runtime; each package ships its own native
library (there is no shared .so).
Install
pip install cityjson-index
Prebuilt wheels are published for:
- Linux x86_64 (manylinux)
- macOS x86_64 and arm64
- Windows AMD64
Python 3.11, 3.12, and 3.13 are supported.
Quick start
from cityjson_index import OpenedIndex
with OpenedIndex.open("city.idx") as index:
package = index.get("building-42")
print(package.id, len(package.payload))
Package source paths
Resolve one persisted backing path per package page while preserving order and duplicates:
with OpenedIndex.open("dataset") as index:
refs = index.package_ref_page_after_record_id(None, 512)
paths = index.package_source_paths(refs)
for ref, source_path in zip(refs, paths, strict=True):
print(ref.record_id, source_path)
Filtered reads
from cityjson_index import PackageFilter, PackageFilterSummary, LodSelection, OpenedIndex
with OpenedIndex.open("dataset") as index:
cityobjects = index.lookup_cityobject_refs("building-42")
refs = index.package_refs_for_cityobject(cityobjects[0])
filter = PackageFilter(
cityobject_types={"Building"},
default_lod=LodSelection.HIGHEST,
lods_by_type={"Building": LodSelection.Exact("2.0")},
)
summary = PackageFilterSummary()
for package in index.read_filtered_packages(refs, filter):
summary.add(package.diagnostics)
print(package.model.summary().model_type)
summary.ensure_requested_lods_available(filter)
Links
- Rust workspace and docs: https://github.com/3DGI/cityjson
- CityJSON specification: https://www.cityjson.org
- Issues: https://github.com/3DGI/cityjson/issues
License
Dual-licensed under MIT or Apache-2.0, at your option.
Metadata
Release files for cityjson-index 0.11.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distributions (wheels)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| cityjson_index-0.11.0-py3-none-win_amd64.whl | Python 3 | none | Windows x86-64 | Details for cityjson_index-0.11.0-py3-none-win_amd64.whl |
| cityjson_index-0.11.0-py3-none-manylinux_2_28_x86_64.whl | Python 3 | none | Linux glibc 2.28+ x86-64 | Details for cityjson_index-0.11.0-py3-none-manylinux_2_28_x86_64.whl |
| cityjson_index-0.11.0-py3-none-macosx_11_0_arm64.whl | Python 3 | none | macOS 11.0+ ARM64 | Details for cityjson_index-0.11.0-py3-none-macosx_11_0_arm64.whl |
Total release size: 8.8 MB
Release files / cityjson_index-0.11.0-py3-none-win_amd64.whl
| Download URL | cityjson_index-0.11.0-py3-none-win_amd64.whl |
|---|---|
| Size | 2.7 MB |
| Tags | Python 3 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
0476e9dc3d61c5c8af5996b06dd12a52af7510061cd416154a312531c9679c3c
|
|
BLAKE2b-256 checksum How to use checksums |
6a7dc452cc7c17f64531d35a25e76649fa587dfa00526249ee8441bd5b199a44
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 4, 2026.
Transparency logRelease files / cityjson_index-0.11.0-py3-none-manylinux_2_28_x86_64.whl
| Download URL | cityjson_index-0.11.0-py3-none-manylinux_2_28_x86_64.whl |
|---|---|
| Size | 3.2 MB |
| Tags | Linux glibc 2.28+ x86-64 Python 3 |
|
SHA-256 checksum How to use checksums |
b4670f1ee5180cc9f62551495265436533e995b994b72071a3e61d66c9dba557
|
|
BLAKE2b-256 checksum How to use checksums |
478732b7b92ead4b8e6d77ec4bf74988f42f7032954769082b98e94a616219e6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 4, 2026.
Transparency logRelease files / cityjson_index-0.11.0-py3-none-macosx_11_0_arm64.whl
| Download URL | cityjson_index-0.11.0-py3-none-macosx_11_0_arm64.whl |
|---|---|
| Size | 2.8 MB |
| Tags | Python 3 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
8867dcfeb9d1659057af5316f9d8a504c11e80e5865420b87b88be702c268045
|
|
BLAKE2b-256 checksum How to use checksums |
d8516b8a6231ddca8c19ab5f79a8c5e27cc10a47cc9ab0a4a5f44a72b795f026
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 4, 2026.
Transparency logSecurity for cityjson-index 0.11.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
All 3 files in this release have been uploaded with provenance metadata.
Attestation for cityjson_index-0.11.0-py3-none-win_amd64.whl
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 4, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.