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.79.0.tar.gz (868.7 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.79.0-py3-none-any.whl (1.0 MB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for generalmanager-0.79.0.tar.gz
Algorithm Hash digest
SHA256 671367b600ed935274618eef378f13a380230b3e5e84070f24bd3ba9c12ec91e
MD5 d2c506bebbc184671554b05aeecfa776
BLAKE2b-256 21159c90b9d754bb5b0f7de5ef5ca2d38b72eccfa8490ac190a2517350c9d8c6

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for generalmanager-0.79.0-py3-none-any.whl
Algorithm Hash digest
SHA256 951179a1ccec622447cb4eea6a666c30db70258296cacaa68c36f814e668dd30
MD5 4f37c66b847044dc7b786d9c97981cc7
BLAKE2b-256 6559bfe31b3534a88bf792033ba82036c870246a533b3289bb0dea955acd96ea

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

This release

0.79.0 This release

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

0.73.1

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