Skip to main content

Protean Application Framework

Project description

Protean

Protean is an opinionated and pragmatic framework for building event-driven applications using the CQRS pattern.

Python Release Build Status Coverage Tests Maintainability

Installation

Protean is available on PyPI:

$ pip install protean

Protean officially supports Python 3.11+.

Quick Start

from protean import Domain
from protean.fields import String, Text

domain = Domain(name="Publishing")

@domain.aggregate
class Post:
    title: String(required=True, max_length=1000)
    slug: String(required=True, max_length=1024)
    content: Text(required=True)

domain.init()
with domain.domain_context():
    post = Post(
        title="Hello World",
        slug="hello-world",
        content="Lorem Ipsum ..."
    )

    domain.repository_for(Post).add(post)

Documentation

Online docs are available at https://docs.proteanhq.com.

Quality

Protean is tested against 5 backing services across 4 Python versions on every commit.

Metric Value
Tests 3,826 (3.5:1 test-to-code ratio)
Linting Zero violations (Ruff)
Complexity Avg 2.97 cyclomatic (A grade)
Maintainability A rank (97% of files)
CI Matrix Python 3.11-3.14 x PostgreSQL, Redis, Elasticsearch, MessageDB, MSSQL

See the full Quality Report for details.

Contributing

Note: Protean framework is not associated or related to Protean eGov Technologies or Code for Gov Tech initiatives.

  1. Check for open issues or open a fresh issue to start a discussion around a feature idea or a bug.
  2. Fork the repository on GitHub, branch off main and start making your changes.
  3. Write a test which shows that the bug was fixed or that the feature works as expected.
  4. Send a pull request and bug the maintainer until it gets merged and published.

For more information, please check out the community section.

License

BSD 3-Clause License

Copyright (c) 2018-2026, Subhash Bhushan C. All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

  • Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

  • Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

  • Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Project details


Download files

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

Source Distribution

protean-0.15.0rc2.tar.gz (676.7 kB view details)

Uploaded Source

Built Distribution

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

protean-0.15.0rc2-py3-none-any.whl (801.4 kB view details)

Uploaded Python 3

File details

Details for the file protean-0.15.0rc2.tar.gz.

File metadata

  • Download URL: protean-0.15.0rc2.tar.gz
  • Upload date:
  • Size: 676.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for protean-0.15.0rc2.tar.gz
Algorithm Hash digest
SHA256 f6e3cb9fef67e808d09fdf8d2742cc1b89f3932495fa90ff410a87894970ef6c
MD5 1a615979fda02646460ca78e4e68060d
BLAKE2b-256 57894607848f8646ef56b919ff1858571aa35cf38785e204dbc9bca990110908

See more details on using hashes here.

Provenance

The following attestation bundles were made for protean-0.15.0rc2.tar.gz:

Publisher: publish.yml on proteanhq/protean

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file protean-0.15.0rc2-py3-none-any.whl.

File metadata

  • Download URL: protean-0.15.0rc2-py3-none-any.whl
  • Upload date:
  • Size: 801.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for protean-0.15.0rc2-py3-none-any.whl
Algorithm Hash digest
SHA256 6aa0f6c03d1054335fbc38760e1c869517b01257ab5539908330fb3f9c114965
MD5 edc28413cd36dd47915290d34a742535
BLAKE2b-256 cee1296b6af0b932fc1948d8e6323547b4f7824fec2d9c9280d8da0f8e3145de

See more details on using hashes here.

Provenance

The following attestation bundles were made for protean-0.15.0rc2-py3-none-any.whl:

Publisher: publish.yml on proteanhq/protean

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page