Package: protean
Protean helps you build software on architecture stacks that need to survive in the ever changing technology landscape.Installationpip install proteanDocumentationOnline docs are available at:https://protean.readthedocs.io/en/latest/How to ContributeCheck for open issues or open a fresh issue to start a discussion
around a feature idea or a bug.Fork [the repository](https://github.com/proteanhq/protean) on
GitHub to start making your changes to themasterbranch (or
branch off of it).Write a test which shows that the bug was fixed or that the feature
works as expected.Send a pull request and bug the maintainer until it gets merged and
published. :) Make sure to add yourself to
[AUTHORS](https://github.com/proteanhq/protean/blob/master/AUTHORS.rst).On shoulders of giants…Protean is not built in a vacuum. Principles and philosophies that Protean espouses are contributions from multiple sources, especially the Open Source Community. It not only refers to well-published architectural ideas and design patterns but also heavily draws inspiration from concrete implementations.Specifically, Protean is majorly influenced by the venerable Django Framework, and that reflects in many aspects of its underlying constructs and documentation. Thank you, Django, and the Python community, for showing what’s possible.[ ~ Dependencies scanned by PyUp.io ~ ]Release HistoryDEV0.9.1Bugfix - Use Domain’s EventStore connection details for clearing events after test runs0.9.0Output VO values as nested dicts instead of a forced flat structureEnclose DAOs within repositories to encourage DB interaction solely through reposRemoveremovemethod from repository to discourage hard deletesManage concurrency with Aggregate versionsAdd MessageDB Event store adapterAdd stand-in Memory Event storeIntroduce EventSourced Aggregates and Event HandlersIntroduce EventSourced RepositoriesAllow filtering of messages from their origin streamAllow Event Handlers to listen to other streams and ALL streamsAllow Command Handler methods to handle any eventWrap EventHandler and CommandHandler methods execute within UnitOfWorkAssociate Commands and Events with streams (explicit and via Aggregates)Support processing events and commands in synchronous mode.Allow asynchronous command processing by submitting commands to domainAddautoflaketopre-commitTreat empty string value as None in Date and DateTime FieldsSupport inter-attribute dependencies in Option defaultsCache registry, repositories, daos, and models with@cacheFix sorting issue with null values in Memory DBAddanyfilter and allow scalar values toinoperator in Memory DB0.8.1Allow custom separator in Elasticsearch namespaces0.8.0Movefieldsmodule to be under main packageAllowListfields to containDictobjectsElasticsearch adapter bugfixes and model enhancementsMake views stateful to allow persistence and retrievalAuto-generate Event’smessage_idSupport pickling of Protean exceptionsBugfix - Fetch view objects instead of simply IDs incache.get_all()Bugfix - Generate embedded ValueObject’s data properly into_dict()Bugfix - Derive SQLAlchemy field types correctly for embedded value object fields0.7.0Simplify Container structure and refactor metaclass usageMigrate data elements to inherit fromBaseContainerRemovemeta_fields and use module functionsResolve associated classes dynamically and on domain activationRemove custom Meta classes and replace withOptions0.6.2Bugfixes forprotean startcommandUse_entityas the field identifier for Element-level errors0.6.1Fix to adapt celery broker to new message payload format0.6.0Introduce Async Standalone ServerAddall()method to repositoryIntroduce Cache Port into ProteanIntroduce View elements into ProteanAdd support for add_* and remove_* methods for HasMany relationshipsEnhanceEntity.to_dict()to output fully-formed JSONFix HasOne issue with updating an itemFix HasMany issue with updating items within UnitOfWorkRefactor ContainerMeta class to be generic for all elementsIntroduce Makefile with useful test/development commandsRemoveorder_byfrom EntityMeta optionsValidate for Repository’s database meta valueMake ValueObject’s aggregate linkage optionalAllow specifying associations with simple Class Names (instead of FQDNs)Refactor field class and remove unnecessary attributes (value, label)Validate for unique values on saving EntitiesIntroduce Docker Compose for all servicesUpgrade SQLAlchemy to support >=1.4.9Upgrade to Elasticsearch 7.13.0Support case-insensitive match in ElasticsearchEnsure compatibility from 3.7 to 3.10Migrate to Github Actions from Travis0.5.8Fix Issue with timestamps in EventLog0.5.7Add support for locking a custom repository to a specific databaseAdd support foruse_sslandverify_certsoptions in Elasticsearch database definition0.5.6Lock down celery to 4.4.x versionRe-Add support for restricting model to a specific database0.5.5 (2020-09-28)Introduce Views (a.k.a Read Models)Refactor Domain Module to be leanerIntroduce Class Factories for all Domain ElementsRenameimpltoadaptersAdd separateportsmodule with interfacesRemovebounded_contextdefinition everywhereRenamedict_repotomemoryRemove*_repofrom DB adapter module namesRenameceleryandinlinebroker module namesRenamesendgridemail module name0.5.4 (2020-09-22)Add support to restrict a model to a specific databaseAdd support for optional pickling ofListfields (leverage Postgres List support)Add support for Overlap operator in SQLAlchemy repo for PostgresqlBugfix - Return keys as Strings forDictfieldAdd support for storing Array of dictionaries in Postgres JSON columnBugfix - Validate unique constraints in Dictionary repoBugfix - Fix broken Entity construction from Elasticsearch model0.5.3 (2020-08-17)Allow Postgres Models to choose b/w Pickle or Custom Types for Array and JSONAdd support for Any operator/lookup for Postgres0.5.2 (2020-08-06)Introduce support for Postgresql Array and JSON columnsAllow restrictingListdatatype to specific content types0.5.1 (2020-07-02)Log Protean exceptions to print helpful debug messagesSupport for installation of optional dependenciesRemove support for Data Transfer ObjectRemove support for Request and Response ObjectsBugfix - Throw Exceptions on Unit of Work commit failuresUseblackas code formatter, with a git pre-commit hookAdd 3.9 to test matrix and cleanup Travis ymlBugfix - Fix broken Sphinx docs build0.5.0 (2020-05-01)Bugfix #304 - Remove shadow object linkages with aggregatesRaise InvalidDataError on invalid attributes to CommandsTreat meta attributes like auto_fields and mandatory_fields as dicts instead of tuplesAdd support for nested serializers/schemas with MarshmallowBugfix to not link shadow fields with Aggregate/Entity classes directlyBugfix to set initialize Shadow (Reference) and Value Object attributes correctlyStore Reference and Value Object fields inEntity.meta_for later useAllow Subscribers and Handlers to hook into multiple EventsBugfix to avoid fetching child records without foreign key linkagesAdd support for Dict serializationAllow persisting and management of child entities via the Aggregate objectAdd support for using Celery as the background worker0.4.0 (2020-03-16)Add support for referencing embedded fields with a defined nameFix to allowdefault=Falseon Boolean fields and subsequent filtering forFalsein field valuesFix to use Entity attributes to derive field names of unique fields, instead ofdeclared_fieldsAdd support for logging events into a universalEventLogtable before publishing to brokersAdd support for custom models associated with Aggregates/EntitiesUse Elasticsearch specific List and Dict attributes to reconstruct entityBugfix - Verify that ValueField object is not empty before trying to access its attributesBugfix - Fix how Elasticsearch connection is fetched while resetting data0.3.3 (2020-01-10)Email Notifications FunctionalitySupport for SendGridAllow ad-hoc Identity Generation0.3.2 (2019-10-17)Auto-traversal bug fixes0.3.1 (2019-10-15)Auto Traverse Domain Modules and load elements0.3 (2019-10-09)Add adefaultsmethod as part of Container objects when assigned defaults in one field based on anotherAdd support for Command HandlersAvoid raisingValidationErrorwhen loading data from data storesAdd support for Elasticsearch as a repositoryAdd support for using Redis as a broker with RQ background workers0.2 ((2019-09-16)New Request Object elements introduced to package information from API/viewsA base Container class introduced for all Protean data objects for uniformity in behaviorSupport for specifying Data Type of auto-generated Identities (String, Integer or UUID)Enhancements and fixes for Unit of Work functionality to work well with SQLAlchemy type database pluginsUnit of Work transactions now control event publishing and release events to the stream only on a successful commitA Simplified element registration process to the domainValidation bug fixes in Aggregates, Entities and Value ObjectsFully functional and configurable logs throughout Protean codebaseTest case restructuring for clarity and isolation of configurations0.1 (2019-07-25)Full revamp of Protean codebase to adhere to DDD principlesAddDomainComposition root, with support for the definition of multiple domains in a projectSupport for Domain Layer elements: Aggregates, Entities, Value Objects, Domain Services, and EventsSupport for Application Layer elements: Application Services, Data Transfer Objects, Repositories, Subscribers and SerializersSupport annotations to register elements with DomainComplete revamping of Repository layer, and introduction of an underlying DAO layerAdd Unit of Work capabilities to support ACID transactionsCollapse SQLAlchemy and Flask implementations in Protean itself temporarily, until API stabilizesRenamesuccessflag on Response tois_successfulRenamemessageattribute in Response object toerrorswith a uniform structure in all error cases0.0.11 (2019-04-23)Rename Repository abstract methods to be public (Ex._create_object→create)Adddelete_all()method to Entity to support Repository cleanupAdd support forrawqueries on Entity repositoriesRemove requirement for explicit Model definitions for EntitiesMove Model options into EntityMetaclassSupport forpre_saveandpost_saveentity callbacksReplacePaginationwithResultSetbecause it is at Entity and Use Case levelReplacepageandper_pagewithlimitandoffsetAdd Command utility to generate Protean project templateProvide command line utilities for–versionandtestBug fix: Handled quotes and escape properly in string values in Dictionary repositoryAdd documentation for Overriding Entity Life cycle methodsAdd ability to mark tests as slow and run slow tests in travis0.0.10 (2019-04-05)Support for chainedupdateanddeletemethods on QuerysetSupport forupdate_allmethod for mass updates on objectsSupport fordelete_allmethod for mass deletion of objectsRename databases configuration key in Config file fromREPOSITORIEStoDATABASESFully expand the Provider class in configuration file, to avoid assuming a Provider class nameSplitAdapterclass intoProviderandRepository, separating the concern of managing the database connection from performing CRUD operations on Entity dataExpose configured databases asprovidersglobal variableAllow fetching new connection on demand of a new repository object viaget_connectioninprovidersRenameLookupclass toBaseLookupAssociate Lookups with Concrete Provider classesProvide option to fully bake a model class in case it needs to be decorated for a specific database, via theget_modelmethod in concrete Provider classAdd support for Entity NamespacesRefactor Repository Factory for better consistency of registry0.0.9 (2019-03-08)Minor fixes for issues found while migrating SQLAlchemy plugin to 0.0.8 versiondeletemethod should query by value ofid_fieldinstead of hard-codedid0.0.8 (2019-02-27)Introduction offind_by()method for EntitiesIntroduction ofsave()method for EntitiesSupport for Query Operators (>, >=, <, <=)Support for Conjunction Operators (AND, OR) in queriesChange Fields to be full-fledged Descriptors to control getting/setting valuesIntroduction of Support for References and Associations (HasOne and HasMany)Remove Pylint from static code analysis and use Flake80.0.7 (2019-01-16)RenameRepositorytoAdapterRenameSchematoModelEnhance Entity class to perform CRUD methods instead of relying on a separate Repo Factory0.0.6 (2018-12-14)Repository rewritten from the ground upFirst base version for overall Protean functionality0.0.5 (2018-07-21)Add Context Class0.0.4 (2018-07-20)Add UseCase Utility ClassesAdd Repository Abstract Classes0.0.3 (2018-07-20)Addbleachas a setup requirementAdd GeoPoint and Decimal Data Types to Entities0.0.2 (2018-07-19)Entity Base Class0.0.1 (2018-07-15)First release on PyPI.