Django Models from EVE SDE
Base models from SDE, with an experiment in in-database translations pulled from the SDE and minor helpers for common functions.
A plain Django app - it works standalone, without AllianceAuth installed. AllianceAuth is used opportunistically where it makes sense (see Optional Settings) but is never a hard requirement.
See eve_sde/sde_types.txt for an idea of the top level fields that are available in the SDE, note that some fields have sub fields that are imported differently.
Compatibility
- Python 3.10 - 3.14
- Django 4.2+
- Redis (required by
celery-oncefor task locking) - AllianceAuth - optional, see Optional Settings
Current list of imported models
- Map
- Region
- Constellation
- SolarSystem
- Planet
- Moon
- NPC Station
- Stargate
- Landmark
- Item Market Groups
- Item Groups
- Item Categories
- Item Types
- Item Dogma
- Dogma Categories
- Dogma Units
- Dogma Attributes
- Dogma Effects
- Blueprints
- Activities
- Products
- Materials
- Activities
- Archetypes
- Freelance Job Schemas
- Parameters
- Sovereignty Upgrades
- Accounting Entry Types
- Notification Types
- Corporation Role Groups
- Corporation Roles
- Metenox Moon Drill
- Skill Plans
- Milestones
- Skill Requirements
- Type Lists
- Types
- Groups
- Categories
Setup
-
pip install django-eveonline-sde -
modify your
local.pyasmodeltranslationneeds to be first in the list.INSTALLED_APPS = [ "modeltranslation", ] + INSTALLED_APPS INSTALLED_APPS += [ # ..... the rest of your apps ]
-
If you're not running AllianceAuth, set
LANGUAGESyourself.modeltranslationadds one DB column per entry inLANGUAGES(e.g.name_de,name_fr_fr), and this package's migrations were generated against the exact set below, so it must match - AllianceAuth already ships this sameLANGUAGESsetting, which is why this step is only needed standalone.LANGUAGES = ( ("en", "English"), ("de", "German"), ("es", "Spanish"), ("it-it", "Italian"), ("ja", "Japanese"), ("ko-kr", "Korean"), ("fr-fr", "French"), ("nl-nl", "Dutch"), ("pl-pl", "Polish"), ("ru", "Russian"), ("uk", "Ukrainian"), ("zh-hans", "Simplified Chinese"), ) USE_I18N = True
-
Add
"eve_sde",to yourINSTALLED_APPS -
migrate etc
-
python manage.py esde_load_sde -
Add a periodic task to check for SDE updates, which tend to happen after downtime.
if "eve_sde" in INSTALLED_APPS: # Run at 12:00 UTC each day CELERYBEAT_SCHEDULE["EVE SDE :: Check for SDE Updates"] = { "task": "eve_sde.tasks.check_for_sde_updates", "schedule": crontab(minute="0", hour="12"), }
Admin
Every SDE model is registered in the Django admin as read-only (browse/search only, no add/change/delete) under /admin/eve_sde/. Two extra pages aren't SDE data themselves, but report on the import process:
- Django EvE SDE (the app's own settings-style page) shows the currently-loaded build number, release date, and last check time. The build number is also shown directly in the app's name in the admin sidebar/index, e.g.
Django EvE SDE v0.0.1 (SDE Build 3142455). - Sde sections shows one row per model with its last update time and a row-count health indicator (green when the imported row count matches the source file's line count, red otherwise).
Optional Settings
ESDE_BATCH_SIZE
Defaults to 500 reduce for smaller DB inserts
ESDE_CHUNK_SIZE
Defaults to 5000 reduce if heavily memory constrained
ESDE_TASK_SPLIT
Splits the update tasks into smaller sub tasks
Defaults to False toggle if bare metal or you have a non standard persistent storage for your myauth folder in docker.
See Issue #26
ESDE_CELERY_TASK_BASE
The Celery task base class used for single-flight locking (skip re-queuing an update task while one is already running/queued). Defaults to AllianceAuth's "allianceauth.services.tasks.QueueOnce". Set to a different "package.module.ClassName" import path, or leave the default - if AllianceAuth isn't installed, this automatically falls back to celery_once.QueueOnce directly with the same locking behavior.
ESDE_FREELANCE_FACTION_MODEL / ESDE_FREELANCE_CHARACTER_MODEL / ESDE_FREELANCE_CORPORATION_MODEL / ESDE_FREELANCE_ALLIANCE_MODEL
Freelance job parameters can require a character, corporation, alliance, or faction as their value - these settings say which model each resolves to. Each is a "package.module.ClassName" import path, defaulting to AllianceAuth's eveonline models (EveCharacter, EveCorporationInfo, EveAllianceInfo, EveFactionInfo). Point them at your own equivalent models, or set any of them to None/leave unset to disable that value type - if the AllianceAuth default can't be imported (AllianceAuth not installed) it degrades to None automatically rather than raising an error.
License
Contributors
Thankyou to all our contributors!
Credits
Because i am lazy, Shamlessley built using This Template <3 @ppfeufer
Metadata
Release files for django-eveonline-sde 0.2.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 | |
|---|---|---|---|
| django_eveonline_sde-0.2.0.tar.gz | 93.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| django_eveonline_sde-0.2.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 224.3 kB
Release files / django_eveonline_sde-0.2.0.tar.gz
| Download URL | django_eveonline_sde-0.2.0.tar.gz |
|---|---|
| Size | 93.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
863f18149c277f8162e17568d4be38fe0da38af025c72148488d6fa2a1bb821a
|
|
BLAKE2b-256 checksum How to use checksums |
50e1efdd0ca4db33d6aad40fa7ccdbe7ce3709c149cd2d5849e4c8e3394e2af5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.7
|
Release files / django_eveonline_sde-0.2.0-py3-none-any.whl
| Download URL | django_eveonline_sde-0.2.0-py3-none-any.whl |
|---|---|
| Size | 130.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8f7f8e0e6a2b43901b680b180e9804dbeab04f7f4ec6d4f06a7c0f7e903ede0e
|
|
BLAKE2b-256 checksum How to use checksums |
bf28bd2c949b87a3a8d4f4477b6c163709a625e0ae69bc7f355dbe5821bca161
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.7
|