Skip to main content

GeneralManager

PyPI Python Build Coverage License: MIT

GeneralManager is a typed, declarative framework for building data-rich Django applications. Define domain objects once, then use the same model through the Django ORM, generated GraphQL, permission policies, validation, calculations, search, and workflows.

GeneralManager is pre-1.0. The main branch and latest PyPI release can differ; use the release history to distinguish published behavior from current development.

What GeneralManager provides

Domain models and interfaces

Start with the architecture overview and interface concepts.

APIs, permissions, and validation

Data and operations

Development and optional integrations

Compatibility

  • Python 3.12 or later
  • Django 5.2.15 or later

CI tests Python 3.12, 3.13, and 3.14 against SQLite, PostgreSQL and MariaDB.

Other database backends supported by Django may also work, but are not officially supported unless covered by GeneralManager’s test suite or maintained examples.

Five-minute setup

Start in an empty directory. On macOS or Linux:

mkdir general-manager-demo
cd general-manager-demo
python -m venv .venv
source .venv/bin/activate
python -m pip install --upgrade pip
python -m pip install GeneralManager
django-admin startproject gm_demo .
python manage.py startapp projects

Append the following to gm_demo/settings.py:

INSTALLED_APPS += [
    "general_manager",
    "projects.apps.ProjectsConfig",
]

AUTOCREATE_GRAPHQL = True
GRAPHQL_URL = "graphql/"
ALLOWED_HOSTS = ["127.0.0.1", "localhost", "testserver"]

Create projects/managers.py:

from typing import ClassVar

from django.db.models import CharField

from general_manager import GeneralManager
from general_manager.interface import DatabaseInterface
from general_manager.permission import AdditiveManagerPermission


class Project(GeneralManager):
    name: str

    class Interface(DatabaseInterface):
        name = CharField(max_length=100)

    class Permission(AdditiveManagerPermission):
        __read__: ClassVar[list[str]] = ["public"]
        __create__: ClassVar[list[str]] = ["isAuthenticated"]
        __update__: ClassVar[list[str]] = ["isAuthenticated"]
        __delete__: ClassVar[list[str]] = ["isAuthenticated"]

GeneralManager discovers managers.py modules in installed Django applications during startup, so no manual import in AppConfig.ready() is needed. Create the generated model's migration, initialize the database, and seed one demo record:

python manage.py makemigrations projects
python manage.py migrate
python manage.py shell -c 'from projects.managers import Project; Project.Factory.create(name="Apollo")'
python manage.py runserver

Project.Factory.create(...) is intended here for demo seeding. Application writes should run through an authenticated permission context.

In another terminal, retrieve the record through generated GraphQL. This GET request is copyable without a CSRF token:

curl --get 'http://127.0.0.1:8000/graphql/' \
  --data-urlencode 'query=query { projectList { items { name } } }'

Expected response:

{"data":{"projectList":{"items":[{"name":"Apollo"}]}}}

You now have a typed manager, generated Django model, migration, persisted record, permission policy, and generated GraphQL query. Continue with the annotated quickstart for Windows activation, framework behavior, and troubleshooting.

Documentation

Project links

Download files

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

Source Distribution

generalmanager-0.73.1.tar.gz (749.4 kB view details)

Uploaded Source

Built Distribution

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

generalmanager-0.73.1-py3-none-any.whl (888.5 kB view details)

Uploaded Python 3

File details

Details for the file generalmanager-0.73.1.tar.gz.

File metadata

  • Download URL: generalmanager-0.73.1.tar.gz
  • Upload date:
  • Size: 749.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.12.13

File hashes

Hashes for generalmanager-0.73.1.tar.gz
Algorithm Hash digest
SHA256 52c9b697a6a95c26d7b14036295e6ea18579e4e3ab7cb656759800d2b988f593
MD5 0288591549263f6a2036fbc53eee22ac
BLAKE2b-256 7462267b3a5282b1342690fdef921c9bd9235a4d8cd92ccb1c9ce222db2ab517

See more details on using hashes here.

File details

Details for the file generalmanager-0.73.1-py3-none-any.whl.

File metadata

  • Download URL: generalmanager-0.73.1-py3-none-any.whl
  • Upload date:
  • Size: 888.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.12.13

File hashes

Hashes for generalmanager-0.73.1-py3-none-any.whl
Algorithm Hash digest
SHA256 4aade5b41ae1dc2620082bc3e4bf6f06abefaba1d11cced2ceea2463b39e28af
MD5 9ad398967784fb9843f4672dfc79f470
BLAKE2b-256 c602c777ce928fb88d85c81419883129dd5b9aceb968ed4d5beeed36a04889f9

See more details on using hashes here.

Release history Release notifications | RSS feed

0.79.3

2 files

0.79.2

2 files

0.79.1

2 files

0.79.0

2 files

0.78.0

2 files

0.77.1

2 files

0.77.0

2 files

0.76.0

2 files

0.75.1

2 files

0.75.0

2 files

0.74.0

2 files

0.73.2

2 files

This release

0.73.1 This release

2 files

0.73.0

2 files

0.72.0

2 files

0.71.0

2 files

0.70.0

2 files

0.69.2

2 files

0.69.1

2 files

0.69.0

2 files

0.68.3

2 files

0.68.2

2 files

0.68.1

2 files

0.68.0

2 files

0.67.7

2 files

0.67.6

2 files

0.67.5

2 files

0.67.4

2 files

0.67.3

2 files

0.67.2

2 files

0.67.1

2 files

0.67.0

2 files

0.66.0

2 files

0.65.1

2 files

0.65.0

2 files

0.64.4

2 files

0.64.3

2 files

0.64.2

2 files

0.64.1

2 files

0.64.0

2 files

0.63.2

2 files

0.63.1

2 files

0.63.0

2 files

0.62.3

2 files

0.62.2

2 files

0.62.1

2 files

0.62.0

2 files

0.61.0

2 files

0.60.6

2 files

0.60.5

2 files

0.60.4

2 files

0.60.3

2 files

0.60.2

2 files

0.60.1

2 files

0.60.0

2 files

0.59.3

2 files

0.59.2

2 files

0.59.1

2 files

0.59.0

2 files

0.58.0

2 files

0.57.4

2 files

0.57.3

2 files

0.57.2

2 files

0.57.1

2 files

0.57.0

2 files

0.56.1

2 files

0.56.0

2 files

0.55.0

2 files

0.54.1

2 files

0.54.0

2 files

0.53.1

2 files

0.53.0

2 files

0.52.2

2 files

0.52.1

2 files

0.52.0

2 files

0.51.0

2 files

0.50.0

2 files

0.49.0

2 files

0.48.0

2 files

0.47.0

2 files

0.46.1

2 files

0.46.0

2 files

0.45.0

2 files

0.44.0

2 files

0.43.0

2 files

0.42.3

2 files

0.42.2

2 files

0.42.1

2 files

0.42.0

2 files

0.41.12

2 files

0.41.11

2 files

0.41.10

2 files

0.41.9

2 files

0.41.8

2 files

0.41.7

2 files

0.41.6

2 files

0.41.5

2 files

0.41.4

2 files

0.41.3

2 files

0.41.2

2 files

0.41.1

2 files

0.41.0

2 files

0.40.6

2 files

0.40.5

2 files

0.40.4

2 files

0.40.3

2 files

0.40.2

2 files

0.40.1

2 files

0.40.0

2 files

0.39.1

2 files

0.39.0

2 files

0.38.2

2 files

0.38.1

2 files

0.38.0

2 files

0.37.5

2 files

0.37.4

2 files

0.37.3

2 files

0.37.2

2 files

0.37.1

2 files

0.37.0

2 files

0.36.3

2 files

0.36.2

2 files

0.36.1

2 files

0.36.0

2 files

0.35.1

2 files

0.35.0

2 files

0.34.0

2 files

0.33.0

2 files

0.32.4

2 files

0.32.3

2 files

0.32.2

2 files

0.32.1

2 files

0.32.0

2 files

0.31.0

2 files

0.30.3

2 files

0.30.2

2 files

0.30.1

2 files

0.30.0

2 files

0.29.2

2 files

0.29.1

2 files

0.29.0

2 files

0.28.0

2 files

0.27.1

2 files

0.27.0

2 files

0.26.1

2 files

0.26.0

2 files

0.25.0

2 files

0.24.3

2 files

0.24.2

2 files

0.24.1

2 files

0.24.0

2 files

0.23.0

2 files

0.22.0

2 files

0.21.0

2 files

0.20.1

2 files

0.20.0

2 files

0.19.2

2 files

0.19.1

2 files

0.19.0

2 files

0.18.0

2 files

0.17.0

2 files

0.16.1

2 files

0.16.0

2 files

0.15.1

2 files

0.15.0

2 files

0.14.1

2 files

0.14.0

2 files

0.13.1

2 files

0.13.0

2 files

0.12.2

2 files

0.12.1

2 files

0.12.0

2 files

0.11.2

2 files

0.11.1

2 files

0.11.0

2 files

0.10.6

2 files

0.10.5

2 files

0.10.4

2 files

0.10.3

2 files

0.10.2

2 files

0.10.1

2 files

0.10.0

2 files

0.9.1

2 files

0.9.0

2 files

0.8.0

2 files

0.7.0

2 files

0.6.2

2 files

0.6.1

2 files

0.6.0

2 files

0.5.2

2 files

0.5.1

2 files

0.5.0

2 files

0.4.6

2 files

0.4.5

2 files

0.4.4

2 files

0.4.3

2 files

0.4.2

2 files

0.4.1

2 files

0.4.0

2 files

0.3.2

2 files

0.3.1

2 files

0.3.0

2 files

0.2.0

2 files

0.1.2

2 files

0.1.1

2 files

0.1.0

2 files

0.0.0

2 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