Skip to main content

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_en equals nom_fr for almost every place; the one exonym is Algiers.
  • 27 communes have code_postal set to None (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.1.0

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

Source distribution (sdist)

Source distribution for algeria-wilayas-communes 1.1.0
File Size Uploaded
algeria_wilayas_communes-1.1.0.tar.gz 154.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for algeria-wilayas-communes 1.1.0
File Interpreter ABI Platform
algeria_wilayas_communes-1.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 343.3 kB

Release files / algeria_wilayas_communes-1.1.0.tar.gz

Download URL algeria_wilayas_communes-1.1.0.tar.gz
Size 154.9 kB
Tags Source
SHA-256 checksum
How to use checksums
55d3f6496a70c90ca95fb2e6fb924c86055129c2b607107c4121e6648ceeb04a
BLAKE2b-256 checksum
How to use checksums
920b969b1c5a1a31f5ce93902fe30f32f91ba6668f68df04a332cfca4423ca07
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.1.0-py3-none-any.whl

Download URL algeria_wilayas_communes-1.1.0-py3-none-any.whl
Size 188.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1e9c700d6c392d569b9d9378ce2ae76f69cd61b3fb54083e254b77581fca1dc0
BLAKE2b-256 checksum
How to use checksums
5ead93a7b8c4857e687e25b4189a2e3353f5223b8f48bf532cbcbecfc48ccdc5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.14

Release history Release notifications | RSS feed

This release

1.1.0 This release

2 release files

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