Registry / web-framework / enmerkar

enmerkar

JSON →
library0.7.1pypypiunverified

Enmerkar is a Python library providing utilities for integrating Babel, a powerful internationalization and localization toolkit, with Django web applications. It is a fork of `django-babel` and is currently at version 0.7.1, offering compatibility with modern Django and Python versions. Releases are infrequent but target essential Django updates.

pip install enmerkar
INSTALL
IMPORT
SIG · ENMERKAR
E
enmerkar
web-frameworkpythonv0.7.1
Install
3.9s avg
Import
568ms
Disk
99MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.9–3.13
musl
3.9–3.13
Install & Compatibility
Where this runs
tested against v0.7.1 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.10–3.910 runs
installs and imports cleanly · install 0.0s · import 0.378s · 99.9MB
glibc
py 3.10–3.910 runs
installs and imports cleanly · install 3.9s · import 0.303s · 100MB
99MB installed
● package 99MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

LocaleMiddleware
✓ from enmerkar.middleware import LocaleMiddleware
✗ from enmerkar import LocaleMiddleware

Configure Enmerkar by adding it to `INSTALLED_APPS` and its `LocaleMiddleware` to `MIDDLEWARE`. Crucially, define `BABEL_DEFAULT_LOCALE` and `BABEL_DEFAULT_TIMEZONE` in your `settings.py`. Then, use `{% load babel %}` in your templates to access Babel's formatting filters for dates, times, and numbers.

# In your Django settings.py INSTALLED_APPS = [ # ... other apps 'enmerkar', ] MIDDLEWARE = [ # ... other middleware, e.g., SessionMiddleware 'enmerkar.middleware.LocaleMiddleware', ] # Required Babel settings BABEL_DEFAULT_LOCALE = 'en_US' BABEL_DEFAULT_TIMEZONE = 'Europe/London' # In a Django template (e.g., mytemplate.html) # {% load babel %} # <p>Formatted Date: {{ datetime_obj|babeldate:'full' }}</p> # <p>Formatted Time: {{ datetime_obj|babeltime:'long' }}</p> # <p>Formatted Number: {{ 12345.67|babelnumber }}</p>
Debug
Known issues
breakingEnmerkar dropped support for Python < 3.5 and Django < 2.2 in version 0.7.1.
fix
Ensure your project runs on Python 3.5+ and Django 2.2+ before upgrading to Enmerkar 0.7.1 or newer. Downgrade Enmerkar or upgrade your environment.
affects: >=0.7.1
breakingThe package was renamed from `django-babel` to `enmerkar` in version 0.7.0.
fix
Uninstall `django-babel` and install `enmerkar`. Update all references in `settings.py` (e.g., `INSTALLED_APPS`, `MIDDLEWARE`) and any direct Python imports from `django_babel` to `enmerkar`.
affects: >=0.7.0
gotchaThe `BABEL_DEFAULT_LOCALE` and `BABEL_DEFAULT_TIMEZONE` settings are mandatory for Enmerkar.
fix
Always define `BABEL_DEFAULT_LOCALE` (e.g., 'en_US') and `BABEL_DEFAULT_TIMEZONE` (e.g., 'Europe/London') in your Django `settings.py` to prevent `ImproperlyConfigured` errors.
affects: All versions
Upgrade
Version history
0.7.1latest on PyPI · released Dec 2, 2019
Audit
Dependencies
DjangorequiredCore framework for integration (requires >=2.2).
BabelrequiredInternationalization and localization toolkit (requires >=2.0).
Agent activity
29 hits · last 30 days
node
26
Resources
enmerkar — pip install enmerkar · libregistry