algeria-wilayas-communes
Algeria's administrative divisions as a zero-dependency Python package — 69 wilayas, 591 daïras, 1541 communes (2025/2026 reform, Loi 26-06) with Arabic / French / English names and postal codes.
pip install algeria-wilayas-communes
Usage
from algeria_wilayas_communes import (
get_all, get_wilayas, get_dairas, get_communes,
by_wilaya, find_by_postal_code, find_commune,
)
len(get_wilayas()) # 69
len(get_communes()) # 1541
by_wilaya(16)["nom_en"] # "Algiers"
find_by_postal_code("16000") # [{"nom_fr": "Alger Centre", ...}]
find_commune("adrar") # communes whose French name contains "adrar"
get_all() # full nested tree: wilaya > daira > commune
API
| Function | Returns |
|---|---|
get_all() |
Full nested tree (wilaya → daïra → commune) |
get_wilayas() |
List of 69 wilayas |
get_dairas() |
List of 591 daïras (each with its wilaya) |
get_communes() |
List of 1541 communes (with wilaya + daïra + postal code) |
by_wilaya(num) |
One wilaya's subtree by number 1..69, or None |
find_by_postal_code(code) |
Communes matching a 5-digit postal code |
find_commune(query) |
Communes whose French name contains query |
Notes
nom_enequalsnom_frfor almost every place; the one exonym is Algiers.- 27 communes have
code_postalset toNone(missing from the reference data). - A daïra split by the reform appears under more than one wilaya — hence 591 daïras.
Source & contributing
https://github.com/el-amin-dev/algeria-wilayas-communes
License
CC0 1.0 — public domain.
Metadata
Release files for algeria-wilayas-communes 1.0.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 | |
|---|---|---|---|
| algeria_wilayas_communes-1.0.0.tar.gz | 154.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| algeria_wilayas_communes-1.0.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 343.3 kB
Release files / algeria_wilayas_communes-1.0.0.tar.gz
| Download URL | algeria_wilayas_communes-1.0.0.tar.gz |
|---|---|
| Size | 154.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c8ec70265dbf75085cf5839e42734569c8171a6f09517d776d98f80838158faa
|
|
BLAKE2b-256 checksum How to use checksums |
8c0b6e81d7812a8208184c1555d2444fca74fc9e323f53e3be5dda06d725ebaa
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.14
|
Release files / algeria_wilayas_communes-1.0.0-py3-none-any.whl
| Download URL | algeria_wilayas_communes-1.0.0-py3-none-any.whl |
|---|---|
| Size | 188.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
38d048dfe7c929552aa6d57d99d1fd4f4c1e49421565b77db044ce0db1346e94
|
|
BLAKE2b-256 checksum How to use checksums |
d796f039d89ca821f5356e654f3f748905dea54356c8e2639eb93251f75eb76b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.14
|