Skip to main content

Work with the Romanian settlement database, SIRUTA

Project description

This project aims to create a library that can import a SIRUTA database and offer simple access to the different elements of the database.

What is SIRUTA?

SIRUTA is the official clasification of the Romanian towns and villages (hereafter called entity). It is maintained by the National Statistics Institute.

It gives every entity a 6 digit code (5-digit unique code and 1-digit checksum). The whole classification is hierachical, with Romania (the country) as root, then 40 counties + Bucharest. Bucharest contains the city of Bucharest, which in turn contains 6 sectors. Every county has municipalities, citiess and communes, and each of those is comprised of towns and villages.

The SIRUTA archives contain detailed documentation about the whole classification, including the algoritm for the checksum.

::: {.note} ::: {.title} Note :::

This library makes the assumption that SIRUTA codes shorter than 6 characters are filled with 0 to the left in order to calculate the checksum. There are 77 codes that do not respect this assumption. Out of those, 76 can be calculated if the code is filled with 0's to the right. The remaining code is 9026. :::

Getting the library

You can either download the tar file (mirror) or get the source code, as described in the development-label{.interpreted-text role="ref"} section.

In both cases, you will also get a copy of the most recent SIRUTA database in CSV (Comma-Separated Values){.interpreted-text role="abbr"} format.

Development {#development-label}

Dependencies

  • a recent version of python is required in order to develop with SIRUTAlib
  • this library uses Git for source control, so you'll need that if you want to get the full source code.
  • if you want to build the help files, you'll also need sphinx and make (the latter is optional)

Getting the source

To work on the SIRUTAlib code, you only need a local repository checkout:

$ git clone https://github.com/strainu/SIRUTA.git
$ cd siruta

You will find 2 python files:

: - sirutalib.py contains the actual library - testsiruta.py contains the tests needed to check the code.

That's it, enjoy!

Using the library

A simple usage example is available in the INSTALL file.

Contributing

If you plan to contribute code to SIRUTAlib, please keep a few things in mind:

: - code should be formatted according to 8{.interpreted-text role="pep"} - tests should be written for all the new code, as long as you don't need to change class internals to test it

Then prepare a patch and submit a pull request on github.

For more contact options, see contact-label{.interpreted-text role="ref"}.

Feedback and contact {#contact-label}

You can register a bug, feature request or pull request on github: https://github.com/strainu/SIRUTA/issues

If you want to contact the author, you can do it by emailing siruta [at] strainu.ro. All the latest information is available on the project's page.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sirutalib-1.3.0.tar.gz (279.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

sirutalib-1.3.0-py3-none-any.whl (277.2 kB view details)

Uploaded Python 3

File details

Details for the file sirutalib-1.3.0.tar.gz.

File metadata

  • Download URL: sirutalib-1.3.0.tar.gz
  • Upload date:
  • Size: 279.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for sirutalib-1.3.0.tar.gz
Algorithm Hash digest
SHA256 d4defa2853f49aaeae35e2b2ca4b6e45f1ec189c3a3f8e04d34419461b0849eb
MD5 e55909cf58de9bd5af8d8132db1f4ef5
BLAKE2b-256 9b68853a61787a9ef7d61458a0950a5269979f886339f85d89c7b884c3a6bc09

See more details on using hashes here.

Provenance

The following attestation bundles were made for sirutalib-1.3.0.tar.gz:

Publisher: python-publish.yml on strainu/SIRUTA

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file sirutalib-1.3.0-py3-none-any.whl.

File metadata

  • Download URL: sirutalib-1.3.0-py3-none-any.whl
  • Upload date:
  • Size: 277.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for sirutalib-1.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7d77a626cf400f8a15649d7e0004612faec93669eeed24450ccbb74fb9621c40
MD5 74d3559434151eb0f334a20933e87312
BLAKE2b-256 2fba458703568744dbc1e385181e7fbfaef3a1cce743ae175ef0400bbb7c3eee

See more details on using hashes here.

Provenance

The following attestation bundles were made for sirutalib-1.3.0-py3-none-any.whl:

Publisher: python-publish.yml on strainu/SIRUTA

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page