Skip to main content

django-party

CI License: MIT PyPI version

Shared party (person/organization) identity for Django sites: contacts, external ids, append-only consent ledger, and thin counterpart account codes.

Not a sales CRM. Not a double-entry ledger.

Requirements

  • Python 3.10+
  • Django 4.2+

Install

pip install django-party
INSTALLED_APPS = [
    # ...
    "party",
    # ...
]

Then migrate:

python manage.py migrate party

Concepts

Model Role
Party Canonical person or organization
ExternalIdentity Multi-source ids (free namespace+scheme+value, e.g. PMS guest id vs fiscal supplier id)
ContactPoint / PostalAddress Channels and addresses with validity
ConsentRecord Append-only privacy/marketing ledger (null ≠ granted)
PartyFact Keyed attributes with validity (IdP snapshots, historical/obsolete facts)
PartyAccount Thin studio account-code metadata (no balances)

ExternalIdentity taxonomy

Pick site-local namespace / scheme strings. Examples:

namespace scheme meaning
pms guest / contact / company hospitality PMS ids
fiscal supplier / cedente fiscal facet primary key
socialprofile user Auth user pk (django-sp sync)
socialprofile google / facebook / twitter / live / instagram / linkedin / discord / github IdP subject uid

Same numeric value may exist under different (namespace, scheme) pairs. An open (namespace, scheme, value) binds to one Party.

Wire PMS/fiscal adapters in the consumer app — not inside party.*.

  • Write consent only via record_consent(); admin add/change/delete are closed.
  • Opt in to payload-key refusal via settings, then call refuse_untrusted_consent_mapping:
PARTY_CONSENT_FORBIDDEN_PAYLOAD_KEYS = {
    "privacy_check",
    "privacy_check_from_admin",
    "promotion_check",
    "promotion_check_from_admin",
}
  • PartyAccount.code must be non-empty and not all-digit (external ids are not studio codes).

License

MIT

Metadata

Release files for django-party 0.3.6

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

Source distribution (sdist)

Source distribution for django-party 0.3.6
File Size Uploaded Provenance Actions
django_party-0.3.6.tar.gz 30.6 kB Without provenance Details for django_party-0.3.6.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for django-party 0.3.6
File Interpreter ABI Platform Actions
django_party-0.3.6-py3-none-any.whl Python 3 none any Details for django_party-0.3.6-py3-none-any.whl

Total release size: 64.8 kB

Release files / django_party-0.3.6.tar.gz

Download URL django_party-0.3.6.tar.gz
Size 30.6 kB
Tags Source
SHA-256 checksum
How to use checksums
a0f9ead2145c26dcfed21b3c90d9e904be7f13aa94cf12cc4bca3ec4c3f951db
BLAKE2b-256 checksum
How to use checksums
c0c2067145785b2d1c4a00e3f50eeff65d2a36f66754f9e07adf6dca9203b832
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Release files / django_party-0.3.6-py3-none-any.whl

Download URL django_party-0.3.6-py3-none-any.whl
Size 34.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9245fac66bf9637778ff4c0176673d9bd756480ceebf9a658b37d6b8da45c258
BLAKE2b-256 checksum
How to use checksums
7a31d64700b5022ba2326319982ec5af24a07cdb20f3b6c1432195967efaa6e5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Security for django-party 0.3.6

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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