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:
- Python guide — install, full API tour, tooling and testing.
- Runnable examples — eight scripts, one per capability, each with its real output. They run as part of the test suite, so they cannot drift.
- Format specification
- Project README
- Issue tracker
License
MIT — see LICENSE.
Metadata
Release files for flatcitybuf 0.6.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| flatcitybuf-0.6.0.tar.gz | 202.9 kB | Without provenance | Details for flatcitybuf-0.6.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| flatcitybuf-0.6.0-py3-none-any.whl | Python 3 | none | any | Details for flatcitybuf-0.6.0-py3-none-any.whl |
Total release size: 289.9 kB
Release files / flatcitybuf-0.6.0.tar.gz
| Download URL | flatcitybuf-0.6.0.tar.gz |
|---|---|
| Size | 202.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
65c3276506d7bc3636882ea4dbcfcc25a7cf431c7a19925b73dae76589d36974
|
|
BLAKE2b-256 checksum How to use checksums |
da8ff3bd8a01e5a17ae19b8fc8b65155cebb89d03d901c6d3bcf2c469814bd4a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.16
|
Release files / flatcitybuf-0.6.0-py3-none-any.whl
| Download URL | flatcitybuf-0.6.0-py3-none-any.whl |
|---|---|
| Size | 87.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a6ecdc3a241f613bd7683700cfc69dbe4f538a53eb781b8c5cf9a1cb05c2fbd4
|
|
BLAKE2b-256 checksum How to use checksums |
1f0b0b0c0b1750923e049a46d332c6c1d4cdb95d206e581ed764a143bfd348b5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.16
|
Security for flatcitybuf 0.6.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.
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.
To learn more about protecting yourself from malicious actors, visit our package security documentation.