Skip to main content

flatcitybuf

A from-scratch, pure-Python reader for FlatCityBuf, a cloud-optimized binary format for 3D city models: CityJSON's semantics in FlatBuffers, with a packed Hilbert R-tree for spatial queries, a static B+tree for attribute queries, and HTTP range requests so a client fetches only the bytes it needs. No FFI and no compiled extension — a single py3-none-any wheel on CPython 3.9+, with flatbuffers as its only required dependency. Reader only: write .fcb files with the Rust CLI or the C++ writer.

pip install flatcitybuf          # or: uv pip install flatcitybuf
pip install "flatcitybuf[numpy]" # optional: ~2.4x faster bulk decoding
import json
import flatcitybuf as fcb

reader = fcb.FcbReader.open_file("city.fcb")

# The CityJSONSeq header line.
print(json.dumps(fcb.to_cityjson_metadata(reader.header)))

# Every feature, in stored (Hilbert) order.
for feature in reader.select_all():
    cj = fcb.to_cityjson_feature(feature, reader.header)

# Over HTTP, byte-range by byte-range (synchronously).
remote = fcb.FcbReader.open(fcb.HttpRangeReader("https://example.com/city.fcb"))

Attribute and spatial queries, the optional-numpy story, development commands, and the migration notes for users of the retired PyO3 extension (0.2.0 and earlier, whose API this does not drop-in replace) are all in the guide:

License

MIT — see LICENSE.

Metadata

Release files for flatcitybuf 0.5.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for flatcitybuf 0.5.2
File Size Uploaded Provenance
flatcitybuf-0.5.2.tar.gz 201.5 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for flatcitybuf 0.5.2
File Interpreter ABI Platform
flatcitybuf-0.5.2-py3-none-any.whl Python 3 none any Details

Total release size: 287.4 kB

Release files / flatcitybuf-0.5.2.tar.gz

Download URL flatcitybuf-0.5.2.tar.gz
Size 201.5 kB
Tags Source
SHA-256 checksum
How to use checksums
f8c40611d0dbe0111b08465b4dc17e889dbfb5b5e0a9010137d816e9b48cf3fb
BLAKE2b-256 checksum
How to use checksums
eae1c0158418c1bddabb35d05f3ad714169daebee4ff77552ac49fc1f9645859
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.13

Release files / flatcitybuf-0.5.2-py3-none-any.whl

Download URL flatcitybuf-0.5.2-py3-none-any.whl
Size 85.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6a6aad6a3a53096481dfb95c082b3a38046e36ac2767571426d4a44910a2d31b
BLAKE2b-256 checksum
How to use checksums
369fdf6146244a924d088ee67c2d6de771213b167ed70acf70de955df2f39781
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.13

Security for flatcitybuf 0.5.2

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A 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.

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