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.5

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.5
File Size Uploaded Provenance Actions
django_party-0.3.5.tar.gz 30.6 kB Without provenance Details for django_party-0.3.5.tar.gz

Built distribution (wheel)

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

Total release size: 64.7 kB

Release files / django_party-0.3.5.tar.gz

Download URL django_party-0.3.5.tar.gz
Size 30.6 kB
Tags Source
SHA-256 checksum
How to use checksums
f21c95c73bb5aa3cebf0c6e98ac107c0dff61c16443d5ae04ff7915225945b64
BLAKE2b-256 checksum
How to use checksums
980acef38ffd3fb2309aef331c142d6f2c83ec4815087999a451b18bf04969ba
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.5-py3-none-any.whl

Download URL django_party-0.3.5-py3-none-any.whl
Size 34.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ccd8b8698c50e1216e400d28b02a5a2908396b5afe8be59a26e0f9a29c651ac9
BLAKE2b-256 checksum
How to use checksums
ffb44785d50e92231403a523662b55b6bcd4839dc5e8aaf9abc5a96ab38f67d0
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.5

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