Skip to main content

German census data, now in PostgreSQL!

Test Documentation Package version

A CLI program that imports German census CSV data (spelled "zensus" in German) into PostgreSQL with PostGIS geographic data types. All data is provided by the Statitisches Bundesamt of Germany. Currently, only data from the 2022 census is available.

If you want to download the raw data yourself or see the website it comes from, check out the link below:

Installing

To install this program, run:

pip install zensus2pgsql

Using

To get started using this tool, you'll first want to see what datasets are availble:

zensus2pgsql list

For now, the names of the data sets are only available in German, so please use translation software if you need help figuring out what they mean!

After you've fond a dataset to import, you can do so by running the following command:

zensus2pgsql create \
  --host localhost \
  --port 5432 \
  --user username \
  --schema public \
  heizungsart eigentuemerquote

The above command will import two dataset related to the type of heating a house uses and the percentage of those who own their home in a particular area.

Contributing

Contributions are welcome and can ake the following forms:

  • Creating a bug report if you've found an issue
  • Creating a feature request if you'd like to see new functionality added
  • Creating a pull request to accomplish either of the two above
  • Leaving a star on the repository

Before creating a pull request, I kindly ask that you either create a bug report or a feature request first, so I can sign off on having it added to the project.

Metadata

Release files for zensus2pgsql 0.2.1

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

Source distribution (sdist)

Source distribution for zensus2pgsql 0.2.1
File Size Uploaded
zensus2pgsql-0.2.1.tar.gz 510.5 kB Details

Built distribution (wheel)

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

Total release size: 546.3 kB

Release files / zensus2pgsql-0.2.1.tar.gz

Download URL zensus2pgsql-0.2.1.tar.gz
Size 510.5 kB
Tags Source
SHA-256 checksum
How to use checksums
00517129cf7747e7580f57c680e143de5e5accca928407cd79bc88c114502ec5
BLAKE2b-256 checksum
How to use checksums
3d587298b9772a9823f16b15a38110dec44086b787c78ee9cf894523a9a117ad
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

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 Jan 8, 2026.

Transparency log

Release files / zensus2pgsql-0.2.1-py3-none-any.whl

Download URL zensus2pgsql-0.2.1-py3-none-any.whl
Size 35.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
10389790516f9c95cd30b93127bec1c7a3b42c0f4293e0bd0caac21bfb1ada23
BLAKE2b-256 checksum
How to use checksums
70d4f0d239419bfd518f1ff8ed8e6ec0575be5045f7792dde39c1f615b4f6a27
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

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 Jan 8, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.2.1 This release

2 release files

0.2.0

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release 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