├── .editorconfig ├── .gitattributes ├── .github ├── ISSUE_TEMPLATE │ ├── bug_report.md │ └── feature_request.md ├── dependabot.yml ├── stale.yml └── workflows │ ├── docs.yml │ ├── minos-broker-kafka-publish.yml │ ├── minos-broker-kafka-tests.yml │ ├── minos-broker-rabbitmq-publish.yml │ ├── minos-broker-rabbitmq-tests.yml │ ├── minos-database-aiopg-publish.yml │ ├── minos-database-aiopg-tests.yml │ ├── minos-database-lmdb-publish.yml │ ├── minos-database-lmdb-tests.yml │ ├── minos-discovery-kong-publish.yml │ ├── minos-discovery-kong-tests.yml │ ├── minos-discovery-minos-publish.yml │ ├── minos-discovery-minos-tests.yml │ ├── minos-http-aiohttp-publish.yml │ ├── minos-http-aiohttp-tests.yml │ ├── minos-microservice-aggregate-publish.yml │ ├── minos-microservice-aggregate-tests.yml │ ├── minos-microservice-common-publish.yml │ ├── minos-microservice-common-tests.yml │ ├── minos-microservice-cqrs-publish.yml │ ├── minos-microservice-cqrs-tests.yml │ ├── minos-microservice-networks-publish.yml │ ├── minos-microservice-networks-tests.yml │ ├── minos-microservice-saga-publish.yml │ ├── minos-microservice-saga-tests.yml │ ├── minos-router-graphql-publish.yml │ ├── minos-router-graphql-tests.yml │ └── release.yml ├── .gitignore ├── .pre-commit-config.yaml ├── .restyled.yaml ├── .sonarcloud.properties ├── AUTHORS.md ├── CODE_OF_CONDUCT.md ├── CONTRIBUTING.md ├── LICENSE ├── Makefile ├── README.md ├── SETUP.md ├── codecov.yml ├── docs ├── Makefile ├── _static │ └── style.css ├── _templates │ └── layout.html ├── conf.py ├── index.md └── standard │ ├── .gitignore │ ├── docs │ ├── architecture │ │ └── overview.md │ ├── index.md │ └── introduction.md │ └── mkdocs.yml ├── packages ├── core │ ├── minos-microservice-aggregate │ │ ├── AUTHORS.md │ │ ├── HISTORY.md │ │ ├── LICENSE │ │ ├── Makefile │ │ ├── README.md │ │ ├── RUNTHETESTS.md │ │ ├── minos │ │ │ └── aggregate │ │ │ │ ├── __init__.py │ │ │ │ ├── actions.py │ │ │ │ ├── aggregate.py │ │ │ │ ├── collections.py │ │ │ │ ├── contextvars.py │ │ │ │ ├── entities │ │ │ │ ├── __init__.py │ │ │ │ ├── collections.py │ │ │ │ ├── models.py │ │ │ │ └── refs │ │ │ │ │ ├── __init__.py │ │ │ │ │ ├── extractors.py │ │ │ │ │ ├── injectors.py │ │ │ │ │ ├── models.py │ │ │ │ │ └── resolvers.py │ │ │ │ ├── events │ │ │ │ ├── __init__.py │ │ │ │ ├── entries.py │ │ │ │ ├── fields.py │ │ │ │ ├── models.py │ │ │ │ └── repositories │ │ │ │ │ ├── __init__.py │ │ │ │ │ ├── abc.py │ │ │ │ │ ├── database │ │ │ │ │ ├── __init__.py │ │ │ │ │ ├── factories.py │ │ │ │ │ └── impl.py │ │ │ │ │ └── memory.py │ │ │ │ ├── exceptions.py │ │ │ │ ├── queries.py │ │ │ │ ├── snapshots │ │ │ │ ├── __init__.py │ │ │ │ ├── entries.py │ │ │ │ ├── repositories │ │ │ │ │ ├── __init__.py │ │ │ │ │ ├── abc.py │ │ │ │ │ ├── database │ │ │ │ │ │ ├── __init__.py │ │ │ │ │ │ ├── factories.py │ │ │ │ │ │ └── impl.py │ │ │ │ │ └── memory.py │ │ │ │ └── services.py │ │ │ │ ├── testing │ │ │ │ ├── __init__.py │ │ │ │ ├── events │ │ │ │ │ ├── __init__.py │ │ │ │ │ └── repositories │ │ │ │ │ │ ├── __init__.py │ │ │ │ │ │ ├── factories.py │ │ │ │ │ │ └── testcases.py │ │ │ │ ├── snapshots │ │ │ │ │ ├── __init__.py │ │ │ │ │ └── repositories │ │ │ │ │ │ ├── __init__.py │ │ │ │ │ │ ├── factories.py │ │ │ │ │ │ └── testcases.py │ │ │ │ └── transactions │ │ │ │ │ ├── __init__.py │ │ │ │ │ └── repositories │ │ │ │ │ ├── __init__.py │ │ │ │ │ ├── factories.py │ │ │ │ │ └── testcases.py │ │ │ │ ├── transactions │ │ │ │ ├── __init__.py │ │ │ │ ├── contextvars.py │ │ │ │ ├── entries.py │ │ │ │ ├── repositories │ │ │ │ │ ├── __init__.py │ │ │ │ │ ├── abc.py │ │ │ │ │ ├── database │ │ │ │ │ │ ├── __init__.py │ │ │ │ │ │ ├── factories.py │ │ │ │ │ │ └── impl.py │ │ │ │ │ └── memory.py │ │ │ │ └── services.py │ │ │ │ └── value_objects.py │ │ ├── poetry.lock │ │ ├── poetry.toml │ │ ├── pyproject.toml │ │ ├── setup.cfg │ │ └── tests │ │ │ ├── __init__.py │ │ │ ├── docker-compose.yml │ │ │ ├── test_aggregate │ │ │ ├── __init__.py │ │ │ ├── test_actions.py │ │ │ ├── test_aggregate.py │ │ │ ├── test_collections.py │ │ │ ├── test_entities │ │ │ │ ├── __init__.py │ │ │ │ ├── test_collections.py │ │ │ │ ├── test_models │ │ │ │ │ ├── __init__.py │ │ │ │ │ ├── test_base.py │ │ │ │ │ ├── test_external.py │ │ │ │ │ └── test_root │ │ │ │ │ │ ├── __init__.py │ │ │ │ │ │ ├── test_base.py │ │ │ │ │ │ ├── test_broker.py │ │ │ │ │ │ ├── test_differences.py │ │ │ │ │ │ ├── test_not_provided.py │ │ │ │ │ │ └── test_with_postgresql.py │ │ │ │ └── test_refs │ │ │ │ │ ├── __init__.py │ │ │ │ │ ├── test_extractors.py │ │ │ │ │ ├── test_injectors.py │ │ │ │ │ ├── test_models.py │ │ │ │ │ └── test_resolvers.py │ │ │ ├── test_events │ │ │ │ ├── __init__.py │ │ │ │ ├── test_entries.py │ │ │ │ ├── test_fields.py │ │ │ │ ├── test_models.py │ │ │ │ └── test_repositories │ │ │ │ │ ├── __init__.py │ │ │ │ │ ├── test_abc.py │ │ │ │ │ ├── test_database.py │ │ │ │ │ └── test_memory.py │ │ │ ├── test_exceptions.py │ │ │ ├── test_queries.py │ │ │ ├── test_snapshots │ │ │ │ ├── __init__.py │ │ │ │ ├── test_entries.py │ │ │ │ ├── test_repositories │ │ │ │ │ ├── __init__.py │ │ │ │ │ ├── test_abc.py │ │ │ │ │ ├── test_database.py │ │ │ │ │ └── test_memory.py │ │ │ │ └── test_services.py │ │ │ ├── test_transactions │ │ │ │ ├── __init__.py │ │ │ │ ├── test_entries.py │ │ │ │ ├── test_repositories │ │ │ │ │ ├── __init__.py │ │ │ │ │ ├── test_abc.py │ │ │ │ │ ├── test_database.py │ │ │ │ │ └── test_memory.py │ │ │ │ └── test_services.py │ │ │ └── test_value_objects.py │ │ │ ├── test_config.yml │ │ │ └── utils.py │ ├── minos-microservice-common │ │ ├── AUTHORS.md │ │ ├── HISTORY.md │ │ ├── LICENSE │ │ ├── Makefile │ │ ├── README.md │ │ ├── RUNTHETESTS.md │ │ ├── minos │ │ │ └── common │ │ │ │ ├── __init__.py │ │ │ │ ├── builders.py │ │ │ │ ├── config │ │ │ │ ├── __init__.py │ │ │ │ ├── abc.py │ │ │ │ ├── v1.py │ │ │ │ └── v2.py │ │ │ │ ├── database │ │ │ │ ├── __init__.py │ │ │ │ ├── clients │ │ │ │ │ ├── __init__.py │ │ │ │ │ ├── abc.py │ │ │ │ │ └── exceptions.py │ │ │ │ ├── locks │ │ │ │ │ ├── __init__.py │ │ │ │ │ ├── factories.py │ │ │ │ │ └── impl.py │ │ │ │ ├── managements.py │ │ │ │ ├── mixins.py │ │ │ │ ├── operations.py │ │ │ │ └── pools.py │ │ │ │ ├── datetime.py │ │ │ │ ├── exceptions.py │ │ │ │ ├── importlib.py │ │ │ │ ├── injections │ │ │ │ ├── __init__.py │ │ │ │ ├── decorators.py │ │ │ │ ├── injectors.py │ │ │ │ └── mixins.py │ │ │ │ ├── launchers.py │ │ │ │ ├── locks.py │ │ │ │ ├── meta.py │ │ │ │ ├── model │ │ │ │ ├── __init__.py │ │ │ │ ├── abc.py │ │ │ │ ├── declarative.py │ │ │ │ ├── dynamic │ │ │ │ │ ├── __init__.py │ │ │ │ │ ├── abc.py │ │ │ │ │ ├── bucket.py │ │ │ │ │ └── dto.py │ │ │ │ ├── fields.py │ │ │ │ ├── serializers │ │ │ │ │ ├── __init__.py │ │ │ │ │ ├── abc.py │ │ │ │ │ └── avro │ │ │ │ │ │ ├── __init__.py │ │ │ │ │ │ ├── data │ │ │ │ │ │ ├── __init__.py │ │ │ │ │ │ ├── decoder.py │ │ │ │ │ │ └── encoder.py │ │ │ │ │ │ └── schema │ │ │ │ │ │ ├── __init__.py │ │ │ │ │ │ ├── constants.py │ │ │ │ │ │ ├── decoder.py │ │ │ │ │ │ └── encoder.py │ │ │ │ └── types │ │ │ │ │ ├── __init__.py │ │ │ │ │ ├── builders.py │ │ │ │ │ ├── comparators.py │ │ │ │ │ ├── constants.py │ │ │ │ │ ├── generics.py │ │ │ │ │ └── model_types.py │ │ │ │ ├── object.py │ │ │ │ ├── pools.py │ │ │ │ ├── ports.py │ │ │ │ ├── protocol │ │ │ │ ├── __init__.py │ │ │ │ ├── abc.py │ │ │ │ ├── avro │ │ │ │ │ ├── __init__.py │ │ │ │ │ ├── base.py │ │ │ │ │ ├── databases.py │ │ │ │ │ └── messages.py │ │ │ │ └── json.py │ │ │ │ ├── retries.py │ │ │ │ ├── setup.py │ │ │ │ ├── testing │ │ │ │ ├── __init__.py │ │ │ │ ├── database │ │ │ │ │ ├── __init__.py │ │ │ │ │ ├── clients.py │ │ │ │ │ ├── factories │ │ │ │ │ │ ├── __init__.py │ │ │ │ │ │ ├── locks.py │ │ │ │ │ │ └── managements.py │ │ │ │ │ └── operations.py │ │ │ │ └── testcases.py │ │ │ │ └── uuid.py │ │ ├── poetry.lock │ │ ├── poetry.toml │ │ ├── pyproject.toml │ │ ├── setup.cfg │ │ └── tests │ │ │ ├── ImportedModule.py │ │ │ ├── __init__.py │ │ │ ├── config │ │ │ ├── v1.yml │ │ │ └── v2.yml │ │ │ ├── docker-compose.yml │ │ │ ├── model_classes.py │ │ │ ├── test_common │ │ │ ├── __init__.py │ │ │ ├── test_builders.py │ │ │ ├── test_config │ │ │ │ ├── __init__.py │ │ │ │ ├── test_abc.py │ │ │ │ ├── test_v1 │ │ │ │ │ ├── __init__.py │ │ │ │ │ ├── test_base.py │ │ │ │ │ ├── test_parameterized.py │ │ │ │ │ └── test_with_env.py │ │ │ │ └── test_v2 │ │ │ │ │ ├── __init__.py │ │ │ │ │ ├── test_base.py │ │ │ │ │ ├── test_parameterized.py │ │ │ │ │ └── test_with_env.py │ │ │ ├── test_database │ │ │ │ ├── __init__.py │ │ │ │ ├── test_clients │ │ │ │ │ ├── __init__.py │ │ │ │ │ └── test_abc.py │ │ │ │ ├── test_locks.py │ │ │ │ ├── test_mixins.py │ │ │ │ ├── test_operations.py │ │ │ │ └── test_pools.py │ │ │ ├── test_datetime.py │ │ │ ├── test_exceptions.py │ │ │ ├── test_importlib.py │ │ │ ├── test_injections │ │ │ │ ├── __init__.py │ │ │ │ ├── test_decorators.py │ │ │ │ ├── test_injectors.py │ │ │ │ └── test_mixins.py │ │ │ ├── test_launchers.py │ │ │ ├── test_locks.py │ │ │ ├── test_model │ │ │ │ ├── __init__.py │ │ │ │ ├── test_abc.py │ │ │ │ ├── test_declarative │ │ │ │ │ ├── __init__.py │ │ │ │ │ ├── test_avro.py │ │ │ │ │ └── test_common.py │ │ │ │ ├── test_dynamic │ │ │ │ │ ├── __init__.py │ │ │ │ │ ├── test_abc.py │ │ │ │ │ ├── test_bucket.py │ │ │ │ │ └── test_dto.py │ │ │ │ ├── test_fields.py │ │ │ │ ├── test_serializers │ │ │ │ │ ├── __init__.py │ │ │ │ │ └── test_avro │ │ │ │ │ │ ├── __init__.py │ │ │ │ │ │ ├── test_data │ │ │ │ │ │ ├── __init__.py │ │ │ │ │ │ ├── test_decoder.py │ │ │ │ │ │ └── test_encoder.py │ │ │ │ │ │ └── test_schema │ │ │ │ │ │ ├── __init__.py │ │ │ │ │ │ ├── test_decoder.py │ │ │ │ │ │ └── test_encoder.py │ │ │ │ └── test_types │ │ │ │ │ ├── __init__.py │ │ │ │ │ ├── test_builders.py │ │ │ │ │ ├── test_comparators.py │ │ │ │ │ ├── test_constants.py │ │ │ │ │ ├── test_generics.py │ │ │ │ │ └── test_model_types.py │ │ │ ├── test_object.py │ │ │ ├── test_pools.py │ │ │ ├── test_ports.py │ │ │ ├── test_protocol │ │ │ │ ├── __init__.py │ │ │ │ ├── test_avro │ │ │ │ │ ├── __init__.py │ │ │ │ │ ├── test_base.py │ │ │ │ │ ├── test_databases.py │ │ │ │ │ └── test_messages.py │ │ │ │ └── test_json.py │ │ │ ├── test_retries.py │ │ │ ├── test_setup.py │ │ │ ├── test_testing.py │ │ │ └── test_uuid.py │ │ │ └── utils.py │ ├── minos-microservice-cqrs │ │ ├── AUTHORS.md │ │ ├── HISTORY.md │ │ ├── LICENSE │ │ ├── Makefile │ │ ├── README.md │ │ ├── RUNTHETESTS.md │ │ ├── minos │ │ │ └── cqrs │ │ │ │ ├── __init__.py │ │ │ │ ├── exceptions.py │ │ │ │ ├── handlers.py │ │ │ │ └── services.py │ │ ├── poetry.lock │ │ ├── poetry.toml │ │ ├── pyproject.toml │ │ ├── setup.cfg │ │ └── tests │ │ │ ├── __init__.py │ │ │ ├── test_config.yml │ │ │ ├── test_cqrs │ │ │ ├── __init__.py │ │ │ ├── test_handlers.py │ │ │ └── test_services.py │ │ │ └── utils.py │ ├── minos-microservice-networks │ │ ├── AUTHORS.md │ │ ├── HISTORY.md │ │ ├── LICENSE │ │ ├── Makefile │ │ ├── README.md │ │ ├── RUNTHETESTS.md │ │ ├── minos │ │ │ └── networks │ │ │ │ ├── __init__.py │ │ │ │ ├── brokers │ │ │ │ ├── __init__.py │ │ │ │ ├── clients.py │ │ │ │ ├── collections │ │ │ │ │ ├── __init__.py │ │ │ │ │ └── queues │ │ │ │ │ │ ├── __init__.py │ │ │ │ │ │ ├── abc.py │ │ │ │ │ │ ├── database │ │ │ │ │ │ ├── __init__.py │ │ │ │ │ │ ├── factories.py │ │ │ │ │ │ └── impl.py │ │ │ │ │ │ └── memory.py │ │ │ │ ├── dispatchers │ │ │ │ │ ├── __init__.py │ │ │ │ │ ├── impl.py │ │ │ │ │ └── requests.py │ │ │ │ ├── handlers │ │ │ │ │ ├── __init__.py │ │ │ │ │ ├── impl.py │ │ │ │ │ └── ports.py │ │ │ │ ├── messages │ │ │ │ │ ├── __init__.py │ │ │ │ │ ├── contextvars.py │ │ │ │ │ └── models │ │ │ │ │ │ ├── __init__.py │ │ │ │ │ │ ├── abc.py │ │ │ │ │ │ └── v1.py │ │ │ │ ├── pools.py │ │ │ │ ├── publishers │ │ │ │ │ ├── __init__.py │ │ │ │ │ ├── abc.py │ │ │ │ │ ├── memory.py │ │ │ │ │ └── queued │ │ │ │ │ │ ├── __init__.py │ │ │ │ │ │ ├── impl.py │ │ │ │ │ │ └── queues │ │ │ │ │ │ ├── __init__.py │ │ │ │ │ │ ├── abc.py │ │ │ │ │ │ ├── database.py │ │ │ │ │ │ └── memory.py │ │ │ │ └── subscribers │ │ │ │ │ ├── __init__.py │ │ │ │ │ ├── abc.py │ │ │ │ │ ├── filtered │ │ │ │ │ ├── __init__.py │ │ │ │ │ ├── impl.py │ │ │ │ │ └── validators │ │ │ │ │ │ ├── __init__.py │ │ │ │ │ │ ├── abc.py │ │ │ │ │ │ └── duplicates │ │ │ │ │ │ ├── __init__.py │ │ │ │ │ │ ├── abc.py │ │ │ │ │ │ ├── database │ │ │ │ │ │ ├── __init__.py │ │ │ │ │ │ ├── factories.py │ │ │ │ │ │ └── impl.py │ │ │ │ │ │ └── memory.py │ │ │ │ │ ├── memory.py │ │ │ │ │ └── queued │ │ │ │ │ ├── __init__.py │ │ │ │ │ ├── impl.py │ │ │ │ │ └── queues │ │ │ │ │ ├── __init__.py │ │ │ │ │ ├── abc.py │ │ │ │ │ ├── database │ │ │ │ │ ├── __init__.py │ │ │ │ │ ├── factories.py │ │ │ │ │ └── impl.py │ │ │ │ │ └── memory.py │ │ │ │ ├── decorators │ │ │ │ ├── __init__.py │ │ │ │ ├── api.py │ │ │ │ ├── callables │ │ │ │ │ ├── __init__.py │ │ │ │ │ ├── checkers.py │ │ │ │ │ └── handlers.py │ │ │ │ ├── collectors.py │ │ │ │ ├── definitions │ │ │ │ │ ├── __init__.py │ │ │ │ │ ├── abc.py │ │ │ │ │ ├── broker.py │ │ │ │ │ ├── checkers.py │ │ │ │ │ ├── http │ │ │ │ │ │ ├── __init__.py │ │ │ │ │ │ ├── abc.py │ │ │ │ │ │ └── rest.py │ │ │ │ │ ├── kinds.py │ │ │ │ │ └── periodic.py │ │ │ │ └── factories.py │ │ │ │ ├── discovery │ │ │ │ ├── __init__.py │ │ │ │ ├── clients │ │ │ │ │ ├── __init__.py │ │ │ │ │ ├── abc.py │ │ │ │ │ └── memory.py │ │ │ │ └── connectors.py │ │ │ │ ├── exceptions.py │ │ │ │ ├── http │ │ │ │ ├── __init__.py │ │ │ │ ├── adapters.py │ │ │ │ ├── connectors.py │ │ │ │ ├── ports.py │ │ │ │ └── requests.py │ │ │ │ ├── requests │ │ │ │ ├── __init__.py │ │ │ │ ├── abc.py │ │ │ │ ├── memory.py │ │ │ │ └── wrapped.py │ │ │ │ ├── routers.py │ │ │ │ ├── scheduling │ │ │ │ ├── __init__.py │ │ │ │ ├── crontab.py │ │ │ │ ├── ports.py │ │ │ │ ├── requests.py │ │ │ │ └── schedulers.py │ │ │ │ ├── specs │ │ │ │ ├── __init__.py │ │ │ │ ├── asyncapi.py │ │ │ │ └── openapi.py │ │ │ │ ├── system │ │ │ │ ├── __init__.py │ │ │ │ └── services.py │ │ │ │ ├── testing │ │ │ │ ├── __init__.py │ │ │ │ └── brokers │ │ │ │ │ ├── __init__.py │ │ │ │ │ ├── collections │ │ │ │ │ ├── __init__.py │ │ │ │ │ └── queues.py │ │ │ │ │ ├── publishers │ │ │ │ │ ├── __init__.py │ │ │ │ │ └── queues.py │ │ │ │ │ └── subscribers │ │ │ │ │ ├── __init__.py │ │ │ │ │ ├── queues.py │ │ │ │ │ └── validators.py │ │ │ │ └── utils.py │ │ ├── poetry.lock │ │ ├── poetry.toml │ │ ├── pyproject.toml │ │ ├── setup.cfg │ │ └── tests │ │ │ ├── __init__.py │ │ │ ├── docker-compose.yml │ │ │ ├── services │ │ │ ├── commands.py │ │ │ └── queries.py │ │ │ ├── test_config.yml │ │ │ ├── test_networks │ │ │ ├── __init__.py │ │ │ ├── test_brokers │ │ │ │ ├── __init__.py │ │ │ │ ├── test_clients.py │ │ │ │ ├── test_collections │ │ │ │ │ ├── __init__.py │ │ │ │ │ └── test_queues │ │ │ │ │ │ ├── __init__.py │ │ │ │ │ │ ├── test_abc.py │ │ │ │ │ │ ├── test_database.py │ │ │ │ │ │ └── test_memory.py │ │ │ │ ├── test_dispatchers │ │ │ │ │ ├── __init__.py │ │ │ │ │ ├── test_impl.py │ │ │ │ │ └── test_requests.py │ │ │ │ ├── test_handlers │ │ │ │ │ ├── __init__.py │ │ │ │ │ ├── test_impl.py │ │ │ │ │ └── test_ports.py │ │ │ │ ├── test_messages │ │ │ │ │ ├── __init__.py │ │ │ │ │ └── test_models │ │ │ │ │ │ ├── __init__.py │ │ │ │ │ │ ├── test_abc.py │ │ │ │ │ │ └── test_v1.py │ │ │ │ ├── test_pools.py │ │ │ │ ├── test_publishers │ │ │ │ │ ├── __init__.py │ │ │ │ │ ├── test_abc.py │ │ │ │ │ ├── test_memory.py │ │ │ │ │ └── test_queued │ │ │ │ │ │ ├── __init__.py │ │ │ │ │ │ ├── test_impl.py │ │ │ │ │ │ └── test_queues │ │ │ │ │ │ ├── __init__.py │ │ │ │ │ │ ├── test_abc.py │ │ │ │ │ │ ├── test_database.py │ │ │ │ │ │ └── test_memory.py │ │ │ │ └── test_subscribers │ │ │ │ │ ├── __init__.py │ │ │ │ │ ├── test_abc.py │ │ │ │ │ ├── test_filtered │ │ │ │ │ ├── __init__.py │ │ │ │ │ ├── test_impl.py │ │ │ │ │ └── test_validators │ │ │ │ │ │ ├── __init__.py │ │ │ │ │ │ ├── test_abc.py │ │ │ │ │ │ └── test_duplicates │ │ │ │ │ │ ├── __init__.py │ │ │ │ │ │ ├── test_abc.py │ │ │ │ │ │ ├── test_database.py │ │ │ │ │ │ └── test_memory.py │ │ │ │ │ ├── test_memory.py │ │ │ │ │ └── test_queued │ │ │ │ │ ├── __init__.py │ │ │ │ │ ├── test_impl.py │ │ │ │ │ └── test_queues │ │ │ │ │ ├── __init__.py │ │ │ │ │ ├── test_abc.py │ │ │ │ │ ├── test_database.py │ │ │ │ │ └── test_memory.py │ │ │ ├── test_decorators │ │ │ │ ├── __init__.py │ │ │ │ ├── test_api.py │ │ │ │ ├── test_callables │ │ │ │ │ ├── __init__.py │ │ │ │ │ ├── test_checkers.py │ │ │ │ │ └── test_handlers.py │ │ │ │ ├── test_collectors.py │ │ │ │ ├── test_definitions │ │ │ │ │ ├── __init__.py │ │ │ │ │ ├── test_abc.py │ │ │ │ │ ├── test_checkers.py │ │ │ │ │ └── test_http │ │ │ │ │ │ ├── __init__.py │ │ │ │ │ │ ├── test_abc.py │ │ │ │ │ │ └── test_rest.py │ │ │ │ └── test_factories.py │ │ │ ├── test_discovery │ │ │ │ ├── __init__.py │ │ │ │ ├── test_clients │ │ │ │ │ ├── test_abc.py │ │ │ │ │ └── test_memory.py │ │ │ │ └── test_connectors.py │ │ │ ├── test_exceptions.py │ │ │ ├── test_http │ │ │ │ ├── __init__.py │ │ │ │ ├── test_adapters.py │ │ │ │ ├── test_connectors.py │ │ │ │ ├── test_ports.py │ │ │ │ └── test_requests.py │ │ │ ├── test_requests │ │ │ │ ├── __init__.py │ │ │ │ ├── test_abc.py │ │ │ │ ├── test_memory.py │ │ │ │ └── test_wrapped.py │ │ │ ├── test_routers.py │ │ │ ├── test_scheduling │ │ │ │ ├── __init__.py │ │ │ │ ├── test_crontab.py │ │ │ │ ├── test_ports.py │ │ │ │ ├── test_requests.py │ │ │ │ └── test_schedulers.py │ │ │ ├── test_specs │ │ │ │ ├── __init__.py │ │ │ │ ├── test_asyncapi.py │ │ │ │ └── test_openapi.py │ │ │ ├── test_system │ │ │ │ ├── __init__.py │ │ │ │ └── test_services.py │ │ │ └── test_utils.py │ │ │ └── utils.py │ └── minos-microservice-saga │ │ ├── AUTHORS.md │ │ ├── HISTORY.md │ │ ├── LICENSE │ │ ├── Makefile │ │ ├── README.md │ │ ├── RUNTHETESTS.md │ │ ├── minos │ │ └── saga │ │ │ ├── __init__.py │ │ │ ├── context.py │ │ │ ├── definitions │ │ │ ├── __init__.py │ │ │ ├── operations.py │ │ │ ├── saga.py │ │ │ ├── steps │ │ │ │ ├── __init__.py │ │ │ │ ├── abc.py │ │ │ │ ├── conditional.py │ │ │ │ ├── local.py │ │ │ │ └── remote.py │ │ │ └── types.py │ │ │ ├── exceptions.py │ │ │ ├── executions │ │ │ ├── __init__.py │ │ │ ├── commit.py │ │ │ ├── executors │ │ │ │ ├── __init__.py │ │ │ │ ├── abc.py │ │ │ │ ├── local.py │ │ │ │ ├── request.py │ │ │ │ └── response.py │ │ │ ├── repositories │ │ │ │ ├── __init__.py │ │ │ │ ├── abc.py │ │ │ │ └── database │ │ │ │ │ ├── __init__.py │ │ │ │ │ ├── factories.py │ │ │ │ │ └── impl.py │ │ │ ├── saga.py │ │ │ ├── status.py │ │ │ └── steps │ │ │ │ ├── __init__.py │ │ │ │ ├── abc.py │ │ │ │ ├── conditional.py │ │ │ │ ├── local.py │ │ │ │ └── remote.py │ │ │ ├── manager.py │ │ │ ├── messages.py │ │ │ ├── middleware.py │ │ │ ├── services.py │ │ │ ├── testing.py │ │ │ └── utils.py │ │ ├── poetry.lock │ │ ├── poetry.toml │ │ ├── pyproject.toml │ │ ├── setup.cfg │ │ └── tests │ │ ├── __init__.py │ │ ├── config.yml │ │ ├── test_saga │ │ ├── __init__.py │ │ ├── test_context.py │ │ ├── test_definitions │ │ │ ├── __init__.py │ │ │ ├── test_operations.py │ │ │ ├── test_saga.py │ │ │ └── test_steps │ │ │ │ ├── __init__.py │ │ │ │ ├── test_abc.py │ │ │ │ ├── test_conditional.py │ │ │ │ ├── test_local.py │ │ │ │ └── test_remote.py │ │ ├── test_exceptions.py │ │ ├── test_executions │ │ │ ├── __init__.py │ │ │ ├── test_commit.py │ │ │ ├── test_executors │ │ │ │ ├── __init__.py │ │ │ │ ├── test_abc.py │ │ │ │ ├── test_local.py │ │ │ │ ├── test_request.py │ │ │ │ └── test_response.py │ │ │ ├── test_repositories │ │ │ │ ├── __init__.py │ │ │ │ ├── test_abc.py │ │ │ │ └── test_database │ │ │ │ │ ├── __init__.py │ │ │ │ │ ├── test_factories.py │ │ │ │ │ └── test_impl.py │ │ │ ├── test_saga │ │ │ │ ├── __init__.py │ │ │ │ ├── test_constructor.py │ │ │ │ ├── test_execute.py │ │ │ │ └── test_raw.py │ │ │ ├── test_status.py │ │ │ └── test_steps │ │ │ │ ├── __init__.py │ │ │ │ ├── test_abc.py │ │ │ │ ├── test_conditional.py │ │ │ │ ├── test_local.py │ │ │ │ └── test_remote.py │ │ ├── test_manager.py │ │ ├── test_messages.py │ │ ├── test_middleware.py │ │ ├── test_services.py │ │ └── test_utils.py │ │ └── utils.py └── plugins │ ├── minos-broker-kafka │ ├── AUTHORS.md │ ├── HISTORY.md │ ├── LICENSE │ ├── Makefile │ ├── README.md │ ├── RUNTHETESTS.md │ ├── minos │ │ └── plugins │ │ │ └── kafka │ │ │ ├── __init__.py │ │ │ ├── common.py │ │ │ ├── publisher.py │ │ │ └── subscriber.py │ ├── poetry.lock │ ├── poetry.toml │ ├── pyproject.toml │ ├── setup.cfg │ └── tests │ │ ├── __init__.py │ │ ├── docker-compose.yml │ │ ├── test_config.yml │ │ ├── test_kafka │ │ ├── __init__.py │ │ ├── test_common.py │ │ ├── test_publisher.py │ │ └── test_subscriber.py │ │ └── utils.py │ ├── minos-broker-rabbitmq │ ├── AUTHORS.md │ ├── HISTORY.md │ ├── LICENSE │ ├── Makefile │ ├── README.md │ ├── RUNTHETESTS.md │ ├── minos │ │ └── plugins │ │ │ └── rabbitmq │ │ │ ├── __init__.py │ │ │ ├── common.py │ │ │ ├── publisher.py │ │ │ └── subscriber.py │ ├── poetry.lock │ ├── poetry.toml │ ├── pyproject.toml │ ├── setup.cfg │ └── tests │ │ ├── __init__.py │ │ ├── docker-compose.yml │ │ ├── test_config.yml │ │ ├── test_rabbitmq │ │ ├── __init__.py │ │ ├── test_common.py │ │ ├── test_integration.py │ │ ├── test_publisher.py │ │ └── test_subscriber.py │ │ └── utils.py │ ├── minos-database-aiopg │ ├── AUTHORS.md │ ├── HISTORY.md │ ├── LICENSE │ ├── Makefile │ ├── README.md │ ├── RUNTHETESTS.md │ ├── minos │ │ └── plugins │ │ │ └── aiopg │ │ │ ├── __init__.py │ │ │ ├── clients.py │ │ │ ├── factories │ │ │ ├── __init__.py │ │ │ ├── aggregate │ │ │ │ ├── __init__.py │ │ │ │ ├── events.py │ │ │ │ ├── snapshots │ │ │ │ │ ├── __init__.py │ │ │ │ │ ├── impl.py │ │ │ │ │ └── queries.py │ │ │ │ └── transactions.py │ │ │ ├── common │ │ │ │ ├── __init__.py │ │ │ │ ├── locks.py │ │ │ │ └── managemens.py │ │ │ └── networks │ │ │ │ ├── __init__.py │ │ │ │ ├── collections │ │ │ │ ├── __init__.py │ │ │ │ └── queues.py │ │ │ │ ├── publishers │ │ │ │ ├── __init__.py │ │ │ │ └── queues.py │ │ │ │ └── subscribers │ │ │ │ ├── __init__.py │ │ │ │ ├── queues.py │ │ │ │ └── validators.py │ │ │ └── operations.py │ ├── poetry.lock │ ├── poetry.toml │ ├── pyproject.toml │ ├── setup.cfg │ └── tests │ │ ├── __init__.py │ │ ├── test_aiopg │ │ ├── __init__.py │ │ ├── test_clients.py │ │ ├── test_factories │ │ │ ├── __init__.py │ │ │ ├── test_aggregate │ │ │ │ ├── __init__.py │ │ │ │ ├── test_events │ │ │ │ │ ├── __init__.py │ │ │ │ │ ├── test_factory.py │ │ │ │ │ └── test_repositories.py │ │ │ │ ├── test_snapshots │ │ │ │ │ ├── __init__.py │ │ │ │ │ ├── test_factory.py │ │ │ │ │ ├── test_queries.py │ │ │ │ │ └── test_repository.py │ │ │ │ └── test_transactions │ │ │ │ │ ├── __init__.py │ │ │ │ │ ├── test_factory.py │ │ │ │ │ └── test_repository.py │ │ │ ├── test_common │ │ │ │ ├── __init__.py │ │ │ │ ├── test_locks.py │ │ │ │ └── test_managements.py │ │ │ └── test_networks │ │ │ │ ├── __init__.py │ │ │ │ ├── test_collections │ │ │ │ ├── __init__.py │ │ │ │ └── test_queues.py │ │ │ │ ├── test_publishers │ │ │ │ ├── __init__.py │ │ │ │ └── test_queues.py │ │ │ │ └── test_subscribers │ │ │ │ ├── __init__.py │ │ │ │ ├── test_queues.py │ │ │ │ └── test_validators.py │ │ └── test_operations.py │ │ ├── test_config.yml │ │ └── utils.py │ ├── minos-database-lmdb │ ├── AUTHORS.md │ ├── HISTORY.md │ ├── LICENSE │ ├── Makefile │ ├── README.md │ ├── RUNTHETESTS.md │ ├── minos │ │ └── plugins │ │ │ └── lmdb │ │ │ ├── __init__.py │ │ │ ├── clients.py │ │ │ ├── factories │ │ │ ├── __init__.py │ │ │ └── saga │ │ │ │ ├── __init__.py │ │ │ │ └── executions.py │ │ │ └── operations.py │ ├── poetry.lock │ ├── poetry.toml │ ├── pyproject.toml │ ├── setup.cfg │ └── tests │ │ ├── __init__.py │ │ ├── test_config.yml │ │ ├── test_lmdb │ │ ├── __init__.py │ │ ├── test_clients.py │ │ └── test_factories │ │ │ ├── __init__.py │ │ │ └── test_saga │ │ │ ├── __init__.py │ │ │ ├── test_factories.py │ │ │ └── test_repositories.py │ │ └── utils.py │ ├── minos-discovery-kong │ ├── AUTHORS.md │ ├── HISTORY.md │ ├── LICENSE │ ├── Makefile │ ├── README.md │ ├── RUNTHETESTS.md │ ├── minos │ │ └── plugins │ │ │ └── kong │ │ │ ├── __init__.py │ │ │ ├── client.py │ │ │ ├── discovery.py │ │ │ ├── middleware.py │ │ │ └── utils.py │ ├── poetry.lock │ ├── poetry.toml │ ├── pyproject.toml │ ├── setup.cfg │ └── tests │ │ ├── Makefile │ │ ├── __init__.py │ │ ├── docker-compose.yml │ │ ├── test_config.yml │ │ ├── test_config_no_auth.yml │ │ ├── test_kong │ │ ├── __init__.py │ │ ├── test_client.py │ │ ├── test_discovery.py │ │ ├── test_middleware.py │ │ └── test_utils.py │ │ └── utils.py │ ├── minos-discovery-minos │ ├── AUTHORS.md │ ├── HISTORY.md │ ├── LICENSE │ ├── Makefile │ ├── README.md │ ├── RUNTHETESTS.md │ ├── minos │ │ └── plugins │ │ │ └── minos_discovery │ │ │ ├── __init__.py │ │ │ └── client.py │ ├── poetry.lock │ ├── poetry.toml │ ├── pyproject.toml │ ├── setup.cfg │ └── tests │ │ └── test_minos_discovery │ │ ├── __init__.py │ │ └── test_client.py │ ├── minos-http-aiohttp │ ├── AUTHORS.md │ ├── HISTORY.md │ ├── LICENSE │ ├── Makefile │ ├── README.md │ ├── RUNTHETESTS.md │ ├── minos │ │ └── plugins │ │ │ └── aiohttp │ │ │ ├── __init__.py │ │ │ ├── connectors.py │ │ │ └── requests.py │ ├── poetry.lock │ ├── poetry.toml │ ├── pyproject.toml │ ├── setup.cfg │ └── tests │ │ ├── __init__.py │ │ ├── test_aiohttp │ │ ├── __init__.py │ │ ├── test_connectors.py │ │ └── test_requests.py │ │ ├── test_config.yml │ │ └── utils.py │ └── minos-router-graphql │ ├── AUTHORS.md │ ├── HISTORY.md │ ├── LICENSE │ ├── Makefile │ ├── README.md │ ├── RUNTHETESTS.md │ ├── minos │ └── plugins │ │ └── graphql │ │ ├── __init__.py │ │ ├── builders │ │ ├── __init__.py │ │ └── schema.py │ │ ├── decorators.py │ │ ├── handlers.py │ │ └── routers.py │ ├── poetry.lock │ ├── poetry.toml │ ├── pyproject.toml │ ├── setup.cfg │ └── tests │ ├── __init__.py │ ├── services │ ├── commands.py │ └── queries.py │ ├── test_config.yml │ ├── test_graphql │ ├── __init__.py │ ├── test_builders │ │ ├── __init__.py │ │ └── test_schema.py │ ├── test_decorators.py │ ├── test_handlers.py │ └── test_routers.py │ └── utils.py ├── poetry.lock ├── poetry.toml ├── pyproject.toml └── tutorials ├── eboutique ├── .minos-answers.yml ├── .minos-project.yaml ├── README.md ├── docker-compose.yml ├── external │ ├── README.md │ ├── apigateway │ │ ├── Dockerfile │ │ └── config.yml │ ├── discovery │ │ ├── Dockerfile │ │ └── config.yml │ └── postgres │ │ ├── 10-create-database.sql │ │ ├── Dockerfile │ │ └── init │ │ └── 10-create-database.sql ├── front │ └── README.md ├── microservices │ ├── README.md │ ├── __init__.py │ ├── cart │ │ ├── .dockerignore │ │ ├── .minos-answers.yml │ │ ├── .minos-microservice.yaml │ │ ├── Dockerfile │ │ ├── README.md │ │ ├── __init__.py │ │ ├── config.yml │ │ ├── poetry.lock │ │ ├── poetry.toml │ │ ├── pyproject.toml │ │ ├── setup.cfg │ │ ├── src │ │ │ ├── __init__.py │ │ │ ├── __main__.py │ │ │ ├── aggregates.py │ │ │ ├── cli.py │ │ │ ├── commands │ │ │ │ ├── __init__.py │ │ │ │ ├── saga │ │ │ │ │ ├── __init__.py │ │ │ │ │ └── add_cart.py │ │ │ │ └── services.py │ │ │ └── queries │ │ │ │ ├── __init__.py │ │ │ │ ├── models.py │ │ │ │ ├── repository.py │ │ │ │ └── services.py │ │ └── tests │ │ │ ├── __init__.py │ │ │ └── test_cart_microservice.py │ ├── checkout │ │ ├── .build_docker_compose.txt │ │ ├── .dockerignore │ │ ├── .minos-answers.yml │ │ ├── .minos-microservice.yaml │ │ ├── Dockerfile │ │ ├── README.md │ │ ├── config.yml │ │ ├── playbooks │ │ │ ├── coverage.yaml │ │ │ ├── create-database.yaml │ │ │ ├── deploy.yaml │ │ │ ├── install.yaml │ │ │ ├── lint.yaml │ │ │ ├── lock.yaml │ │ │ ├── reformat.yaml │ │ │ ├── test.yaml │ │ │ └── update.yaml │ │ ├── poetry.lock │ │ ├── poetry.toml │ │ ├── pyproject.toml │ │ ├── setup.cfg │ │ ├── src │ │ │ ├── __init__.py │ │ │ ├── __main__.py │ │ │ ├── aggregates.py │ │ │ ├── cli.py │ │ │ ├── commands │ │ │ │ ├── __init__.py │ │ │ │ └── services.py │ │ │ └── queries │ │ │ │ ├── __init__.py │ │ │ │ ├── models.py │ │ │ │ ├── repository.py │ │ │ │ └── services.py │ │ └── tests │ │ │ ├── __init__.py │ │ │ ├── test_aggregates.py │ │ │ ├── test_commands │ │ │ ├── __init__.py │ │ │ └── test_services.py │ │ │ ├── test_queries │ │ │ ├── __init__.py │ │ │ └── test_services.py │ │ │ └── utils.py │ ├── currency │ │ ├── .dockerignore │ │ ├── .minos-answers.yml │ │ ├── .minos-microservice.yaml │ │ ├── Dockerfile │ │ ├── README.md │ │ ├── config.yml │ │ ├── poetry.lock │ │ ├── poetry.toml │ │ ├── pyproject.toml │ │ ├── setup.cfg │ │ ├── src │ │ │ ├── __init__.py │ │ │ ├── __main__.py │ │ │ ├── aggregates.py │ │ │ ├── cli.py │ │ │ ├── commands │ │ │ │ ├── __init__.py │ │ │ │ └── services.py │ │ │ ├── currency_files │ │ │ │ └── ecb_20220314.zip │ │ │ └── queries │ │ │ │ ├── __init__.py │ │ │ │ └── services.py │ │ └── tests │ │ │ ├── __init__.py │ │ │ ├── test_aggregates.py │ │ │ ├── test_commands │ │ │ ├── __init__.py │ │ │ └── test_services.py │ │ │ ├── test_queries │ │ │ ├── __init__.py │ │ │ └── test_services.py │ │ │ └── utils.py │ ├── notifier │ │ ├── .build_docker_compose.txt │ │ ├── .dockerignore │ │ ├── .minos-answers.yml │ │ ├── .minos-microservice.yaml │ │ ├── Dockerfile │ │ ├── README.md │ │ ├── config.yml │ │ ├── playbooks │ │ │ ├── coverage.yaml │ │ │ ├── create-database.yaml │ │ │ ├── deploy.yaml │ │ │ ├── install.yaml │ │ │ ├── lint.yaml │ │ │ ├── lock.yaml │ │ │ ├── reformat.yaml │ │ │ ├── test.yaml │ │ │ └── update.yaml │ │ ├── poetry.lock │ │ ├── poetry.toml │ │ ├── pyproject.toml │ │ ├── setup.cfg │ │ ├── src │ │ │ ├── __init__.py │ │ │ ├── __main__.py │ │ │ ├── aggregates.py │ │ │ ├── cli.py │ │ │ ├── commands │ │ │ │ ├── __init__.py │ │ │ │ └── services.py │ │ │ └── queries │ │ │ │ ├── __init__.py │ │ │ │ ├── models.py │ │ │ │ ├── repository.py │ │ │ │ └── services.py │ │ └── tests │ │ │ ├── __init__.py │ │ │ ├── test_commands │ │ │ ├── __init__.py │ │ │ └── test_services.py │ │ │ └── utils.py │ ├── payment │ │ ├── .dockerignore │ │ ├── .minos-answers.yml │ │ ├── .minos-microservice.yaml │ │ ├── Dockerfile │ │ ├── README.md │ │ ├── config.yml │ │ ├── playbooks │ │ │ ├── coverage.yaml │ │ │ ├── create-database.yaml │ │ │ ├── deploy.yaml │ │ │ ├── install.yaml │ │ │ ├── lint.yaml │ │ │ ├── lock.yaml │ │ │ ├── reformat.yaml │ │ │ ├── test.yaml │ │ │ └── update.yaml │ │ ├── poetry.lock │ │ ├── poetry.toml │ │ ├── pyproject.toml │ │ ├── setup.cfg │ │ ├── src │ │ │ ├── __init__.py │ │ │ ├── __main__.py │ │ │ ├── aggregates.py │ │ │ ├── cli.py │ │ │ ├── commands │ │ │ │ ├── __init__.py │ │ │ │ └── services.py │ │ │ └── queries │ │ │ │ ├── __init__.py │ │ │ │ ├── models.py │ │ │ │ ├── repository.py │ │ │ │ └── services.py │ │ └── tests │ │ │ ├── __init__.py │ │ │ ├── test_commands │ │ │ ├── __init__.py │ │ │ └── test_services.py │ │ │ ├── test_queries │ │ │ ├── __init__.py │ │ │ └── test_services.py │ │ │ └── utils.py │ ├── product │ │ ├── .dockerignore │ │ ├── .minos-answers.yml │ │ ├── .minos-microservice.yaml │ │ ├── Dockerfile │ │ ├── README.md │ │ ├── config.yml │ │ ├── poetry.lock │ │ ├── poetry.toml │ │ ├── pyproject.toml │ │ ├── setup.cfg │ │ ├── src │ │ │ ├── __init__.py │ │ │ ├── __main__.py │ │ │ ├── aggregates.py │ │ │ ├── cli.py │ │ │ ├── commands │ │ │ │ ├── __init__.py │ │ │ │ └── services.py │ │ │ └── queries │ │ │ │ ├── __init__.py │ │ │ │ ├── models.py │ │ │ │ ├── repository.py │ │ │ │ └── services.py │ │ └── tests │ │ │ ├── __init__.py │ │ │ └── test_product_microservice.py │ └── shipping │ │ ├── .dockerignore │ │ ├── .minos-answers.yml │ │ ├── .minos-microservice.yaml │ │ ├── Dockerfile │ │ ├── README.md │ │ ├── config.yml │ │ ├── poetry.lock │ │ ├── poetry.toml │ │ ├── pyproject.toml │ │ ├── setup.cfg │ │ ├── src │ │ ├── __init__.py │ │ ├── __main__.py │ │ ├── aggregates.py │ │ ├── cli.py │ │ ├── commands │ │ │ ├── __init__.py │ │ │ └── services.py │ │ └── queries │ │ │ ├── __init__.py │ │ │ └── services.py │ │ └── tests │ │ ├── __init__.py │ │ ├── test_commands │ │ ├── __init__.py │ │ └── test_services.py │ │ └── utils.py └── requirements.txt └── stock-wallet ├── .minos-answers.yml ├── .minos-project.yaml ├── README.md ├── docker-compose.yml ├── docker-compose.yml.copy ├── external ├── README.md ├── apigateway │ ├── Dockerfile │ └── config.yml ├── discovery │ ├── Dockerfile │ └── config.yml └── postgres │ ├── 10-create-database.sql │ └── Dockerfile └── microservices ├── README.md ├── crypto ├── .dockerignore ├── .minos-answers.yml ├── .minos-microservice.yaml ├── Dockerfile ├── README.md ├── config.yml ├── poetry.lock ├── poetry.toml ├── pyproject.toml ├── setup.cfg ├── src │ ├── __init__.py │ ├── __main__.py │ ├── aggregates.py │ ├── cli.py │ ├── commands │ │ ├── __init__.py │ │ └── services.py │ └── queries │ │ ├── __init__.py │ │ ├── models.py │ │ ├── repository.py │ │ └── services.py └── tests │ ├── __init__.py │ ├── test_commands │ ├── __init__.py │ └── test_services.py │ ├── test_queries │ ├── __init__.py │ └── test_services.py │ └── utils.py ├── stocks ├── .dockerignore ├── .minos-answers.yml ├── .minos-microservice.yaml ├── Dockerfile ├── README.md ├── config.yml ├── poetry.lock ├── poetry.toml ├── pyproject.toml ├── setup.cfg ├── src │ ├── __init__.py │ ├── __main__.py │ ├── aggregates.py │ ├── cli.py │ ├── commands │ │ ├── __init__.py │ │ └── services.py │ └── queries │ │ ├── __init__.py │ │ ├── models.py │ │ ├── repository.py │ │ └── services.py └── tests │ ├── __init__.py │ ├── test_commands │ ├── __init__.py │ └── test_services.py │ ├── test_queries │ ├── __init__.py │ └── test_services.py │ └── utils.py └── wallet ├── .build_docker_compose.txt ├── .dockerignore ├── .minos-answers.yml ├── .minos-microservice.yaml ├── Dockerfile ├── README.md ├── config.yml ├── poetry.lock ├── poetry.toml ├── pyproject.toml ├── setup.cfg ├── src ├── __init__.py ├── __main__.py ├── aggregates.py ├── cli.py ├── commands │ ├── __init__.py │ └── services.py └── queries │ ├── __init__.py │ ├── models.py │ ├── repository.py │ └── services.py └── tests ├── __init__.py ├── test_commands ├── __init__.py └── test_services.py ├── test_queries ├── __init__.py ├── test_repositories.py └── test_services.py └── utils.py /.editorconfig: -------------------------------------------------------------------------------- 1 | # http://editorconfig.org 2 | 3 | root = true 4 | 5 | [*] 6 | indent_style = space 7 | indent_size = 4 8 | trim_trailing_whitespace = true 9 | insert_final_newline = true 10 | charset = utf-8 11 | end_of_line = lf 12 | 13 | [*.bat] 14 | indent_style = tab 15 | end_of_line = crlf 16 | 17 | [LICENSE] 18 | insert_final_newline = false 19 | 20 | [Makefile] 21 | indent_style = tab 22 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature_request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Feature request 3 | about: Suggest an idea for this project 4 | title: '' 5 | labels: '' 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Is your feature request related to a problem? Please describe.** 11 | A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] 12 | 13 | **Describe the solution you'd like** 14 | A clear and concise description of what you want to happen. 15 | 16 | **Describe alternatives you've considered** 17 | A clear and concise description of any alternative solutions or features you've considered. 18 | 19 | **Additional context** 20 | Add any other context or screenshots about the feature request here. 21 | -------------------------------------------------------------------------------- /.github/stale.yml: -------------------------------------------------------------------------------- 1 | daysUntilStale: 90 2 | daysUntilClose: 14 3 | exemptLabels: 4 | - pinned 5 | - security 6 | staleLabel: wontfix 7 | markComment: > 8 | This issue has been automatically marked as stale because it has not had 9 | recent activity. It will be closed if no further activity occurs. Thank you 10 | for your contributions. 11 | closeComment: false 12 | -------------------------------------------------------------------------------- /.github/workflows/release.yml: -------------------------------------------------------------------------------- 1 | name: "Release" 2 | 3 | on: 4 | push: 5 | branches: 6 | - '*.*.x' 7 | 8 | jobs: 9 | deploy: 10 | runs-on: ubuntu-latest 11 | container: python:3.9-buster 12 | 13 | steps: 14 | - name: Check out repository code 15 | uses: actions/checkout@v2 16 | 17 | - name: Release Templates 18 | uses: softprops/action-gh-release@v1 19 | with: 20 | draft: true 21 | -------------------------------------------------------------------------------- /.restyled.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | enabled: true 3 | exclude: 4 | - "**/*.md" 5 | - ".idea/**/*" 6 | - "docs/**/*" 7 | - "**/*.in" 8 | - "Makefile" 9 | - ".github/workflows/**/*" 10 | restylers: 11 | - name: black 12 | command: 13 | - black 14 | arguments: ["--line-length", "120"] 15 | include: 16 | - "**/*.py" 17 | interpreters: 18 | - python 19 | - name: isort 20 | command: 21 | - isort 22 | arguments: [] 23 | include: 24 | - "**/*.py" 25 | interpreters: 26 | - python 27 | -------------------------------------------------------------------------------- /.sonarcloud.properties: -------------------------------------------------------------------------------- 1 | sonar.python.version=3.9 2 | sonar.exclusions=tutorials/** 3 | sonar.cpd.exclusions=**/tests/**, **/testing/** -------------------------------------------------------------------------------- /AUTHORS.md: -------------------------------------------------------------------------------- 1 | # Credits 2 | 3 | ## Development Lead 4 | 5 | * Andrea Mucci 6 | 7 | ## Core Devs 8 | 9 | * Sergio Garcia Prado 10 | * Vladyslav Fenchak 11 | * Alberto Amigo Alonso 12 | 13 | ## Contributors 14 | 15 | None yet. Why not be the first? 16 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | .PHONY: install docs 2 | 3 | DOCS_TARGET := ./docs/api-reference/packages 4 | 5 | install: 6 | poetry install 7 | 8 | docs: 9 | rm -rf docs/api-reference 10 | poetry run $(MAKE) --directory=docs html 11 | -------------------------------------------------------------------------------- /SETUP.md: -------------------------------------------------------------------------------- 1 | # Set up a development environment 2 | 3 | Since we use `poetry` as the default package manager, it must be installed. Please refer to 4 | `https://python-poetry.org/docs/#installation`. 5 | 6 | Run `poetry install` to get the dependencies. 7 | 8 | Run `pre-commit install` to set the git checks before committing. 9 | 10 | Make yourself sure you are able to run the tests. Refer to the appropriate section in this guide. 11 | -------------------------------------------------------------------------------- /codecov.yml: -------------------------------------------------------------------------------- 1 | coverage: 2 | status: 3 | project: 4 | default: 5 | threshold: 1% 6 | if_not_found: failure 7 | comment: false 8 | -------------------------------------------------------------------------------- /docs/Makefile: -------------------------------------------------------------------------------- 1 | # Minimal makefile for Sphinx documentation 2 | # 3 | 4 | # You can set these variables from the command line. 5 | SPHINXOPTS = 6 | SPHINXBUILD = sphinx-build 7 | SPHINXPROJ = minos-python 8 | SOURCEDIR = . 9 | BUILDDIR = _build 10 | 11 | # Put it first so that "make" without argument is like "make help". 12 | help: 13 | @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) 14 | 15 | .PHONY: help Makefile 16 | 17 | # Catch-all target: route all unknown targets to Sphinx using the new 18 | # "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). 19 | %: Makefile 20 | @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) 21 | -------------------------------------------------------------------------------- /docs/_static/style.css: -------------------------------------------------------------------------------- 1 | .wy-nav-content { 2 | max-width: 1200px !important; 3 | } 4 | 5 | dl[class*="py"] { 6 | display: block !important; 7 | } 8 | 9 | dl[class*="py"] > dt { 10 | display: block !important; 11 | } -------------------------------------------------------------------------------- /docs/_templates/layout.html: -------------------------------------------------------------------------------- 1 | {% extends "!layout.html" %} 2 | {% block extrahead %} 3 | 4 | {% endblock %} -------------------------------------------------------------------------------- /docs/standard/.gitignore: -------------------------------------------------------------------------------- 1 | site -------------------------------------------------------------------------------- /docs/standard/docs/introduction.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minos-framework/minos-python/3427fdaed489d3b9330c80ce15d77975e0135b9c/docs/standard/docs/introduction.md -------------------------------------------------------------------------------- /docs/standard/mkdocs.yml: -------------------------------------------------------------------------------- 1 | site_name: Minos Standard 2 | site_author: Andrea Mucci 3 | site_description: >- 4 | Minos Protocol Standard 5 | copyright: Copyright © 2021 - 2022 Clariteia 6 | theme: 7 | name: material 8 | language: es 9 | features: 10 | - navigation.instant 11 | - navigation.sections 12 | extra: 13 | version: 14 | provider: mike 15 | plugins: 16 | - search 17 | - mermaid2: 18 | version: 8.14.0 19 | 20 | nav: 21 | - Home: index.md 22 | - Introduction: introduction.md 23 | - Architecture: 24 | - Overview: architecture/overview.md 25 | -------------------------------------------------------------------------------- /packages/core/minos-microservice-aggregate/AUTHORS.md: -------------------------------------------------------------------------------- 1 | # Credits 2 | 3 | ## Development Lead 4 | 5 | * Andrea Mucci 6 | 7 | ## Core Devs 8 | 9 | * Sergio Garcia Prado 10 | * Vladyslav Fenchak 11 | * Alberto Amigo Alonso 12 | 13 | ## Contributors 14 | 15 | None yet. Why not be the first? 16 | -------------------------------------------------------------------------------- /packages/core/minos-microservice-aggregate/Makefile: -------------------------------------------------------------------------------- 1 | .PHONY: docs dist 2 | 3 | lint: 4 | poetry run flake8 5 | 6 | test: 7 | poetry run pytest 8 | 9 | coverage: 10 | poetry run coverage run -m pytest 11 | poetry run coverage report -m 12 | poetry run coverage xml 13 | 14 | reformat: 15 | poetry run black --line-length 120 minos tests 16 | poetry run isort minos tests 17 | 18 | release: 19 | $(MAKE) dist 20 | poetry publish 21 | 22 | dist: 23 | poetry build 24 | ls -l dist 25 | 26 | install: 27 | poetry install 28 | 29 | update: 30 | poetry update 31 | 32 | check: 33 | $(MAKE) install 34 | $(MAKE) reformat 35 | $(MAKE) lint 36 | $(MAKE) test 37 | $(MAKE) dist 38 | -------------------------------------------------------------------------------- /packages/core/minos-microservice-aggregate/RUNTHETESTS.md: -------------------------------------------------------------------------------- 1 | # Run the tests 2 | 3 | In order to run the tests, please make sure you have the `Docker Engine `_ 4 | and `Docker Compose `_ installed. 5 | 6 | Move into tests/ directory 7 | 8 | `cd tests/` 9 | 10 | Run service dependencies: 11 | 12 | `docker-compose up -d` 13 | 14 | Install library dependencies: 15 | 16 | `make install` 17 | 18 | Run tests: 19 | 20 | `make test` 21 | -------------------------------------------------------------------------------- /packages/core/minos-microservice-aggregate/minos/aggregate/contextvars.py: -------------------------------------------------------------------------------- 1 | from contextvars import ( 2 | ContextVar, 3 | ) 4 | from typing import ( 5 | Final, 6 | ) 7 | 8 | IS_REPOSITORY_SERIALIZATION_CONTEXT_VAR: Final[ContextVar[bool]] = ContextVar( 9 | "is_repository_serialization", default=False 10 | ) 11 | """Context variable containing ``True`` if serialization has been started by a repository, or ``False`` otherwise.""" 12 | -------------------------------------------------------------------------------- /packages/core/minos-microservice-aggregate/minos/aggregate/entities/__init__.py: -------------------------------------------------------------------------------- 1 | from .collections import ( 2 | EntitySet, 3 | ) 4 | from .models import ( 5 | Entity, 6 | ExternalEntity, 7 | RootEntity, 8 | ) 9 | from .refs import ( 10 | Ref, 11 | RefExtractor, 12 | RefInjector, 13 | RefResolver, 14 | ) 15 | -------------------------------------------------------------------------------- /packages/core/minos-microservice-aggregate/minos/aggregate/entities/refs/__init__.py: -------------------------------------------------------------------------------- 1 | from .extractors import ( 2 | RefExtractor, 3 | ) 4 | from .injectors import ( 5 | RefInjector, 6 | ) 7 | from .models import ( 8 | Ref, 9 | ) 10 | from .resolvers import ( 11 | RefResolver, 12 | ) 13 | -------------------------------------------------------------------------------- /packages/core/minos-microservice-aggregate/minos/aggregate/events/__init__.py: -------------------------------------------------------------------------------- 1 | from .entries import ( 2 | EventEntry, 3 | ) 4 | from .fields import ( 5 | FieldDiff, 6 | FieldDiffContainer, 7 | IncrementalFieldDiff, 8 | ) 9 | from .models import ( 10 | Event, 11 | ) 12 | from .repositories import ( 13 | DatabaseEventRepository, 14 | EventDatabaseOperationFactory, 15 | EventRepository, 16 | InMemoryEventRepository, 17 | ) 18 | -------------------------------------------------------------------------------- /packages/core/minos-microservice-aggregate/minos/aggregate/events/repositories/__init__.py: -------------------------------------------------------------------------------- 1 | from .abc import ( 2 | EventRepository, 3 | ) 4 | from .database import ( 5 | DatabaseEventRepository, 6 | EventDatabaseOperationFactory, 7 | ) 8 | from .memory import ( 9 | InMemoryEventRepository, 10 | ) 11 | -------------------------------------------------------------------------------- /packages/core/minos-microservice-aggregate/minos/aggregate/events/repositories/database/__init__.py: -------------------------------------------------------------------------------- 1 | from .factories import ( 2 | EventDatabaseOperationFactory, 3 | ) 4 | from .impl import ( 5 | DatabaseEventRepository, 6 | ) 7 | -------------------------------------------------------------------------------- /packages/core/minos-microservice-aggregate/minos/aggregate/snapshots/__init__.py: -------------------------------------------------------------------------------- 1 | from .entries import ( 2 | SnapshotEntry, 3 | ) 4 | from .repositories import ( 5 | DatabaseSnapshotRepository, 6 | InMemorySnapshotRepository, 7 | SnapshotDatabaseOperationFactory, 8 | SnapshotRepository, 9 | ) 10 | from .services import ( 11 | SnapshotService, 12 | ) 13 | -------------------------------------------------------------------------------- /packages/core/minos-microservice-aggregate/minos/aggregate/snapshots/repositories/__init__.py: -------------------------------------------------------------------------------- 1 | from .abc import ( 2 | SnapshotRepository, 3 | ) 4 | from .database import ( 5 | DatabaseSnapshotRepository, 6 | SnapshotDatabaseOperationFactory, 7 | ) 8 | from .memory import ( 9 | InMemorySnapshotRepository, 10 | ) 11 | -------------------------------------------------------------------------------- /packages/core/minos-microservice-aggregate/minos/aggregate/snapshots/repositories/database/__init__.py: -------------------------------------------------------------------------------- 1 | from .factories import ( 2 | SnapshotDatabaseOperationFactory, 3 | ) 4 | from .impl import ( 5 | DatabaseSnapshotRepository, 6 | ) 7 | -------------------------------------------------------------------------------- /packages/core/minos-microservice-aggregate/minos/aggregate/testing/__init__.py: -------------------------------------------------------------------------------- 1 | from .events import ( 2 | EventRepositoryTestCase, 3 | MockedEventDatabaseOperationFactory, 4 | ) 5 | from .snapshots import ( 6 | MockedSnapshotDatabaseOperationFactory, 7 | SnapshotRepositoryTestCase, 8 | ) 9 | from .transactions import ( 10 | MockedTransactionDatabaseOperationFactory, 11 | TransactionRepositoryTestCase, 12 | ) 13 | -------------------------------------------------------------------------------- /packages/core/minos-microservice-aggregate/minos/aggregate/testing/events/__init__.py: -------------------------------------------------------------------------------- 1 | from .repositories import ( 2 | EventRepositoryTestCase, 3 | MockedEventDatabaseOperationFactory, 4 | ) 5 | -------------------------------------------------------------------------------- /packages/core/minos-microservice-aggregate/minos/aggregate/testing/events/repositories/__init__.py: -------------------------------------------------------------------------------- 1 | from .factories import ( 2 | MockedEventDatabaseOperationFactory, 3 | ) 4 | from .testcases import ( 5 | EventRepositoryTestCase, 6 | ) 7 | -------------------------------------------------------------------------------- /packages/core/minos-microservice-aggregate/minos/aggregate/testing/snapshots/__init__.py: -------------------------------------------------------------------------------- 1 | from .repositories import ( 2 | MockedSnapshotDatabaseOperationFactory, 3 | SnapshotRepositoryTestCase, 4 | ) 5 | -------------------------------------------------------------------------------- /packages/core/minos-microservice-aggregate/minos/aggregate/testing/snapshots/repositories/__init__.py: -------------------------------------------------------------------------------- 1 | from .factories import ( 2 | MockedSnapshotDatabaseOperationFactory, 3 | ) 4 | from .testcases import ( 5 | SnapshotRepositoryTestCase, 6 | ) 7 | -------------------------------------------------------------------------------- /packages/core/minos-microservice-aggregate/minos/aggregate/testing/transactions/__init__.py: -------------------------------------------------------------------------------- 1 | from .repositories import ( 2 | MockedTransactionDatabaseOperationFactory, 3 | TransactionRepositoryTestCase, 4 | ) 5 | -------------------------------------------------------------------------------- /packages/core/minos-microservice-aggregate/minos/aggregate/testing/transactions/repositories/__init__.py: -------------------------------------------------------------------------------- 1 | from .factories import ( 2 | MockedTransactionDatabaseOperationFactory, 3 | ) 4 | from .testcases import ( 5 | TransactionRepositoryTestCase, 6 | ) 7 | -------------------------------------------------------------------------------- /packages/core/minos-microservice-aggregate/minos/aggregate/transactions/__init__.py: -------------------------------------------------------------------------------- 1 | from .contextvars import ( 2 | TRANSACTION_CONTEXT_VAR, 3 | ) 4 | from .entries import ( 5 | TransactionEntry, 6 | TransactionStatus, 7 | ) 8 | from .repositories import ( 9 | DatabaseTransactionRepository, 10 | InMemoryTransactionRepository, 11 | TransactionDatabaseOperationFactory, 12 | TransactionRepository, 13 | ) 14 | from .services import ( 15 | TransactionService, 16 | ) 17 | -------------------------------------------------------------------------------- /packages/core/minos-microservice-aggregate/minos/aggregate/transactions/contextvars.py: -------------------------------------------------------------------------------- 1 | from __future__ import ( 2 | annotations, 3 | ) 4 | 5 | from contextvars import ( 6 | ContextVar, 7 | ) 8 | from typing import ( 9 | TYPE_CHECKING, 10 | Final, 11 | Optional, 12 | ) 13 | 14 | if TYPE_CHECKING: 15 | from .entries import ( 16 | TransactionEntry, 17 | ) 18 | 19 | TRANSACTION_CONTEXT_VAR: Final[ContextVar[Optional[TransactionEntry]]] = ContextVar("transaction", default=None) 20 | """Context Variable that contains the identifier of the currently active transaction, or ``None`` otherwise.""" 21 | -------------------------------------------------------------------------------- /packages/core/minos-microservice-aggregate/minos/aggregate/transactions/repositories/__init__.py: -------------------------------------------------------------------------------- 1 | from .abc import ( 2 | TransactionRepository, 3 | ) 4 | from .database import ( 5 | DatabaseTransactionRepository, 6 | TransactionDatabaseOperationFactory, 7 | ) 8 | from .memory import ( 9 | InMemoryTransactionRepository, 10 | ) 11 | -------------------------------------------------------------------------------- /packages/core/minos-microservice-aggregate/minos/aggregate/transactions/repositories/database/__init__.py: -------------------------------------------------------------------------------- 1 | from .factories import ( 2 | TransactionDatabaseOperationFactory, 3 | ) 4 | from .impl import ( 5 | DatabaseTransactionRepository, 6 | ) 7 | -------------------------------------------------------------------------------- /packages/core/minos-microservice-aggregate/poetry.toml: -------------------------------------------------------------------------------- 1 | [virtualenvs] 2 | in-project = true 3 | -------------------------------------------------------------------------------- /packages/core/minos-microservice-aggregate/setup.cfg: -------------------------------------------------------------------------------- 1 | [coverage:run] 2 | source = 3 | minos 4 | 5 | [coverage:report] 6 | exclude_lines = 7 | pragma: no cover 8 | raise NotImplementedError 9 | if TYPE_CHECKING: 10 | pass 11 | if __name__ == "__main__": 12 | 13 | [flake8] 14 | filename = 15 | ./minos/**/*.py, 16 | ./tests/**/*.py, 17 | ./examples/**/*.py 18 | max-line-length = 120 19 | per-file-ignores = 20 | ./**/__init__.py:F401,W391 21 | 22 | [isort] 23 | known_first_party=minos 24 | multi_line_output = 3 25 | include_trailing_comma = True 26 | force_grid_wrap = 1 27 | use_parentheses = True 28 | line_length = 120 29 | -------------------------------------------------------------------------------- /packages/core/minos-microservice-aggregate/tests/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minos-framework/minos-python/3427fdaed489d3b9330c80ce15d77975e0135b9c/packages/core/minos-microservice-aggregate/tests/__init__.py -------------------------------------------------------------------------------- /packages/core/minos-microservice-aggregate/tests/test_aggregate/__init__.py: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /packages/core/minos-microservice-aggregate/tests/test_aggregate/test_entities/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minos-framework/minos-python/3427fdaed489d3b9330c80ce15d77975e0135b9c/packages/core/minos-microservice-aggregate/tests/test_aggregate/test_entities/__init__.py -------------------------------------------------------------------------------- /packages/core/minos-microservice-aggregate/tests/test_aggregate/test_entities/test_models/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minos-framework/minos-python/3427fdaed489d3b9330c80ce15d77975e0135b9c/packages/core/minos-microservice-aggregate/tests/test_aggregate/test_entities/test_models/__init__.py -------------------------------------------------------------------------------- /packages/core/minos-microservice-aggregate/tests/test_aggregate/test_entities/test_models/test_external.py: -------------------------------------------------------------------------------- 1 | import unittest 2 | from uuid import ( 3 | uuid4, 4 | ) 5 | 6 | from tests.utils import ( 7 | Product, 8 | ) 9 | 10 | 11 | class TestExternalEntity(unittest.TestCase): 12 | def test_values(self): 13 | uuid = uuid4() 14 | product = Product(uuid, 3, "apple", 3028) 15 | 16 | self.assertEqual(uuid, product.uuid) 17 | self.assertEqual(3, product.version) 18 | self.assertEqual("apple", product.title) 19 | self.assertEqual(3028, product.quantity) 20 | 21 | 22 | if __name__ == "__main__": 23 | unittest.main() 24 | -------------------------------------------------------------------------------- /packages/core/minos-microservice-aggregate/tests/test_aggregate/test_entities/test_models/test_root/__init__.py: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /packages/core/minos-microservice-aggregate/tests/test_aggregate/test_entities/test_refs/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minos-framework/minos-python/3427fdaed489d3b9330c80ce15d77975e0135b9c/packages/core/minos-microservice-aggregate/tests/test_aggregate/test_entities/test_refs/__init__.py -------------------------------------------------------------------------------- /packages/core/minos-microservice-aggregate/tests/test_aggregate/test_events/__init__.py: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /packages/core/minos-microservice-aggregate/tests/test_aggregate/test_events/test_repositories/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minos-framework/minos-python/3427fdaed489d3b9330c80ce15d77975e0135b9c/packages/core/minos-microservice-aggregate/tests/test_aggregate/test_events/test_repositories/__init__.py -------------------------------------------------------------------------------- /packages/core/minos-microservice-aggregate/tests/test_aggregate/test_snapshots/__init__.py: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /packages/core/minos-microservice-aggregate/tests/test_aggregate/test_snapshots/test_repositories/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minos-framework/minos-python/3427fdaed489d3b9330c80ce15d77975e0135b9c/packages/core/minos-microservice-aggregate/tests/test_aggregate/test_snapshots/test_repositories/__init__.py -------------------------------------------------------------------------------- /packages/core/minos-microservice-aggregate/tests/test_aggregate/test_transactions/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minos-framework/minos-python/3427fdaed489d3b9330c80ce15d77975e0135b9c/packages/core/minos-microservice-aggregate/tests/test_aggregate/test_transactions/__init__.py -------------------------------------------------------------------------------- /packages/core/minos-microservice-aggregate/tests/test_aggregate/test_transactions/test_repositories/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minos-framework/minos-python/3427fdaed489d3b9330c80ce15d77975e0135b9c/packages/core/minos-microservice-aggregate/tests/test_aggregate/test_transactions/test_repositories/__init__.py -------------------------------------------------------------------------------- /packages/core/minos-microservice-common/AUTHORS.md: -------------------------------------------------------------------------------- 1 | # Credits 2 | 3 | ## Development Lead 4 | 5 | * Andrea Mucci 6 | 7 | ## Core Devs 8 | 9 | * Sergio Garcia Prado 10 | * Vladyslav Fenchak 11 | * Alberto Amigo Alonso 12 | 13 | ## Contributors 14 | 15 | None yet. Why not be the first? 16 | -------------------------------------------------------------------------------- /packages/core/minos-microservice-common/Makefile: -------------------------------------------------------------------------------- 1 | .PHONY: docs dist 2 | 3 | lint: 4 | poetry run flake8 5 | 6 | test: 7 | poetry run pytest 8 | 9 | coverage: 10 | poetry run coverage run -m pytest 11 | poetry run coverage report -m 12 | poetry run coverage xml 13 | 14 | reformat: 15 | poetry run black --line-length 120 minos tests 16 | poetry run isort minos tests 17 | 18 | release: 19 | $(MAKE) dist 20 | poetry publish 21 | 22 | dist: 23 | poetry build 24 | ls -l dist 25 | 26 | install: 27 | poetry install 28 | 29 | update: 30 | poetry update 31 | 32 | check: 33 | $(MAKE) install 34 | $(MAKE) reformat 35 | $(MAKE) lint 36 | $(MAKE) test 37 | $(MAKE) dist 38 | -------------------------------------------------------------------------------- /packages/core/minos-microservice-common/RUNTHETESTS.md: -------------------------------------------------------------------------------- 1 | # Run the tests 2 | 3 | In order to run the tests, please make sure you have the `Docker Engine `_ 4 | and `Docker Compose `_ installed. 5 | 6 | Move into tests/ directory 7 | 8 | `cd tests/` 9 | 10 | Run service dependencies: 11 | 12 | `docker-compose up -d` 13 | 14 | Install library dependencies: 15 | 16 | `make install` 17 | 18 | Run tests: 19 | 20 | `make test` 21 | -------------------------------------------------------------------------------- /packages/core/minos-microservice-common/minos/common/config/__init__.py: -------------------------------------------------------------------------------- 1 | from .abc import ( 2 | Config, 3 | MinosConfig, 4 | ) 5 | from .v1 import ( 6 | ConfigV1, 7 | ) 8 | from .v2 import ( 9 | ConfigV2, 10 | ) 11 | -------------------------------------------------------------------------------- /packages/core/minos-microservice-common/minos/common/database/clients/__init__.py: -------------------------------------------------------------------------------- 1 | from .abc import ( 2 | DatabaseClient, 3 | DatabaseClientBuilder, 4 | ) 5 | from .exceptions import ( 6 | ConnectionException, 7 | DatabaseClientException, 8 | IntegrityException, 9 | ProgrammingException, 10 | ) 11 | -------------------------------------------------------------------------------- /packages/core/minos-microservice-common/minos/common/database/clients/exceptions.py: -------------------------------------------------------------------------------- 1 | from ...exceptions import ( 2 | MinosException, 3 | ) 4 | 5 | 6 | class DatabaseClientException(MinosException): 7 | """Base exception for database client.""" 8 | 9 | 10 | class ConnectionException(DatabaseClientException): 11 | """Exception to be raised when database client is not able to connect to the database.""" 12 | 13 | 14 | class IntegrityException(DatabaseClientException): 15 | """Exception to be raised when an integrity check is not satisfied.""" 16 | 17 | 18 | class ProgrammingException(DatabaseClientException): 19 | """Exception to be raised when an integrity check is not satisfied.""" 20 | -------------------------------------------------------------------------------- /packages/core/minos-microservice-common/minos/common/database/locks/__init__.py: -------------------------------------------------------------------------------- 1 | from .factories import ( 2 | LockDatabaseOperationFactory, 3 | ) 4 | from .impl import ( 5 | DatabaseLock, 6 | ) 7 | -------------------------------------------------------------------------------- /packages/core/minos-microservice-common/minos/common/datetime.py: -------------------------------------------------------------------------------- 1 | from datetime import ( 2 | datetime, 3 | timezone, 4 | ) 5 | 6 | 7 | def current_datetime() -> datetime: 8 | """Get current datetime in `UTC`. 9 | 10 | :return: A ``datetime`` instance. 11 | """ 12 | return datetime.now(tz=timezone.utc) 13 | 14 | 15 | NULL_DATETIME = datetime.max.replace(tzinfo=timezone.utc) 16 | -------------------------------------------------------------------------------- /packages/core/minos-microservice-common/minos/common/injections/__init__.py: -------------------------------------------------------------------------------- 1 | from .decorators import ( 2 | Inject, 3 | Injectable, 4 | ) 5 | from .injectors import ( 6 | DependencyInjector, 7 | ) 8 | from .mixins import ( 9 | InjectableMixin, 10 | ) 11 | -------------------------------------------------------------------------------- /packages/core/minos-microservice-common/minos/common/injections/mixins.py: -------------------------------------------------------------------------------- 1 | from ..setup import ( 2 | SetupMixin, 3 | ) 4 | 5 | 6 | class InjectableMixin(SetupMixin): 7 | """Injectable Mixin class.""" 8 | 9 | _injectable_name: str 10 | 11 | @classmethod 12 | def _set_injectable_name(cls, name: str) -> None: 13 | cls._injectable_name = name 14 | 15 | @classmethod 16 | def get_injectable_name(cls) -> str: 17 | """Get the injectable name. 18 | 19 | :return: A ``str`` value. 20 | """ 21 | return cls._injectable_name 22 | -------------------------------------------------------------------------------- /packages/core/minos-microservice-common/minos/common/model/dynamic/__init__.py: -------------------------------------------------------------------------------- 1 | from .abc import ( 2 | DynamicModel, 3 | ) 4 | from .bucket import ( 5 | BucketModel, 6 | ) 7 | from .dto import ( 8 | DataTransferObject, 9 | ) 10 | -------------------------------------------------------------------------------- /packages/core/minos-microservice-common/minos/common/model/dynamic/bucket.py: -------------------------------------------------------------------------------- 1 | from __future__ import ( 2 | annotations, 3 | ) 4 | 5 | from typing import ( 6 | Type, 7 | TypeVar, 8 | ) 9 | 10 | from .abc import ( 11 | DynamicModel, 12 | ) 13 | 14 | 15 | class BucketModel(DynamicModel): 16 | """Bucket Model class.""" 17 | 18 | @classmethod 19 | def empty(cls: Type[T]) -> T: 20 | """Build an empty ``BucketModel`` instance. 21 | 22 | :return: A ``BucketModel`` instance. 23 | """ 24 | return cls(fields=dict()) 25 | 26 | 27 | T = TypeVar("T", bound=BucketModel) 28 | -------------------------------------------------------------------------------- /packages/core/minos-microservice-common/minos/common/model/serializers/__init__.py: -------------------------------------------------------------------------------- 1 | from .abc import ( 2 | DataDecoder, 3 | DataEncoder, 4 | SchemaDecoder, 5 | SchemaEncoder, 6 | ) 7 | from .avro import ( 8 | AvroDataDecoder, 9 | AvroDataEncoder, 10 | AvroSchemaDecoder, 11 | AvroSchemaEncoder, 12 | ) 13 | -------------------------------------------------------------------------------- /packages/core/minos-microservice-common/minos/common/model/serializers/avro/__init__.py: -------------------------------------------------------------------------------- 1 | from .data import ( 2 | AvroDataDecoder, 3 | AvroDataEncoder, 4 | ) 5 | from .schema import ( 6 | AvroSchemaDecoder, 7 | AvroSchemaEncoder, 8 | ) 9 | -------------------------------------------------------------------------------- /packages/core/minos-microservice-common/minos/common/model/serializers/avro/data/__init__.py: -------------------------------------------------------------------------------- 1 | from .decoder import ( 2 | AvroDataDecoder, 3 | ) 4 | from .encoder import ( 5 | AvroDataEncoder, 6 | ) 7 | -------------------------------------------------------------------------------- /packages/core/minos-microservice-common/minos/common/model/serializers/avro/schema/__init__.py: -------------------------------------------------------------------------------- 1 | from .decoder import ( 2 | AvroSchemaDecoder, 3 | ) 4 | from .encoder import ( 5 | AvroSchemaEncoder, 6 | ) 7 | -------------------------------------------------------------------------------- /packages/core/minos-microservice-common/minos/common/model/types/__init__.py: -------------------------------------------------------------------------------- 1 | from .builders import ( 2 | TypeHintBuilder, 3 | TypeHintParser, 4 | build_union, 5 | ) 6 | from .comparators import ( 7 | TypeHintComparator, 8 | is_model_subclass, 9 | is_model_type, 10 | is_type_subclass, 11 | ) 12 | from .constants import ( 13 | MissingSentinel, 14 | NoneType, 15 | ) 16 | from .generics import ( 17 | GenericTypeProjector, 18 | unpack_typevar, 19 | ) 20 | from .model_types import ( 21 | FieldType, 22 | ModelType, 23 | ) 24 | -------------------------------------------------------------------------------- /packages/core/minos-microservice-common/minos/common/model/types/constants.py: -------------------------------------------------------------------------------- 1 | NoneType = type(None) 2 | 3 | 4 | class MissingSentinel: 5 | """Class to detect when a field is not initialized.""" 6 | -------------------------------------------------------------------------------- /packages/core/minos-microservice-common/minos/common/object.py: -------------------------------------------------------------------------------- 1 | class Object: 2 | """Object class.""" 3 | 4 | def __init__(self, *args, **kwargs): 5 | super().__init__() 6 | -------------------------------------------------------------------------------- /packages/core/minos-microservice-common/minos/common/protocol/__init__.py: -------------------------------------------------------------------------------- 1 | from .abc import ( 2 | MinosBinaryProtocol, 3 | ) 4 | from .avro import ( 5 | MinosAvroDatabaseProtocol, 6 | MinosAvroMessageProtocol, 7 | MinosAvroProtocol, 8 | ) 9 | from .json import ( 10 | MinosJsonBinaryProtocol, 11 | ) 12 | -------------------------------------------------------------------------------- /packages/core/minos-microservice-common/minos/common/protocol/avro/__init__.py: -------------------------------------------------------------------------------- 1 | from .base import ( 2 | MinosAvroProtocol, 3 | ) 4 | from .databases import ( 5 | MinosAvroDatabaseProtocol, 6 | ) 7 | from .messages import ( 8 | MinosAvroMessageProtocol, 9 | ) 10 | -------------------------------------------------------------------------------- /packages/core/minos-microservice-common/minos/common/testing/__init__.py: -------------------------------------------------------------------------------- 1 | from .database import ( 2 | MockedDatabaseClient, 3 | MockedDatabaseOperation, 4 | MockedLockDatabaseOperationFactory, 5 | MockedManagementDatabaseOperationFactory, 6 | ) 7 | from .testcases import ( 8 | DatabaseMinosTestCase, 9 | MinosTestCase, 10 | ) 11 | -------------------------------------------------------------------------------- /packages/core/minos-microservice-common/minos/common/testing/database/__init__.py: -------------------------------------------------------------------------------- 1 | from .clients import ( 2 | MockedDatabaseClient, 3 | ) 4 | from .factories import ( 5 | MockedLockDatabaseOperationFactory, 6 | MockedManagementDatabaseOperationFactory, 7 | ) 8 | from .operations import ( 9 | MockedDatabaseOperation, 10 | ) 11 | -------------------------------------------------------------------------------- /packages/core/minos-microservice-common/minos/common/testing/database/factories/__init__.py: -------------------------------------------------------------------------------- 1 | from .locks import ( 2 | MockedLockDatabaseOperationFactory, 3 | ) 4 | from .managements import ( 5 | MockedManagementDatabaseOperationFactory, 6 | ) 7 | -------------------------------------------------------------------------------- /packages/core/minos-microservice-common/minos/common/testing/database/operations.py: -------------------------------------------------------------------------------- 1 | from collections.abc import ( 2 | Iterable, 3 | ) 4 | from typing import ( 5 | Any, 6 | Optional, 7 | ) 8 | 9 | from ...database import ( 10 | DatabaseOperation, 11 | ) 12 | 13 | 14 | class MockedDatabaseOperation(DatabaseOperation): 15 | """For testing purposes""" 16 | 17 | def __init__(self, content: str, response: Optional[Iterable[Any]] = tuple(), *args, **kwargs): 18 | super().__init__(*args, **kwargs) 19 | self.content = content 20 | self.response = tuple(response) 21 | -------------------------------------------------------------------------------- /packages/core/minos-microservice-common/minos/common/uuid.py: -------------------------------------------------------------------------------- 1 | import re 2 | from uuid import ( 3 | UUID, 4 | ) 5 | 6 | NULL_UUID = UUID("00000000-0000-0000-0000-000000000000") 7 | UUID_REGEX = re.compile(r"\w{8}-\w{4}-\w{4}-\w{4}-\w{12}") 8 | -------------------------------------------------------------------------------- /packages/core/minos-microservice-common/poetry.toml: -------------------------------------------------------------------------------- 1 | [virtualenvs] 2 | in-project = true 3 | -------------------------------------------------------------------------------- /packages/core/minos-microservice-common/setup.cfg: -------------------------------------------------------------------------------- 1 | [coverage:run] 2 | source = 3 | minos 4 | 5 | [coverage:report] 6 | exclude_lines = 7 | pragma: no cover 8 | raise NotImplementedError 9 | if TYPE_CHECKING: 10 | pass 11 | precision = 2 12 | 13 | [flake8] 14 | filename = 15 | ./minos/**/*.py, 16 | ./tests/**/*.py, 17 | ./examples/**/*.py 18 | max-line-length = 120 19 | per-file-ignores = 20 | ./**/__init__.py:F401,W391 21 | 22 | [isort] 23 | known_first_party=minos 24 | multi_line_output = 3 25 | include_trailing_comma = True 26 | force_grid_wrap = 1 27 | use_parentheses = True 28 | line_length = 120 29 | -------------------------------------------------------------------------------- /packages/core/minos-microservice-common/tests/ImportedModule.py: -------------------------------------------------------------------------------- 1 | class ImportedClassTest(object): 2 | def return_test_example(self): 3 | return "test passed" 4 | -------------------------------------------------------------------------------- /packages/core/minos-microservice-common/tests/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minos-framework/minos-python/3427fdaed489d3b9330c80ce15d77975e0135b9c/packages/core/minos-microservice-common/tests/__init__.py -------------------------------------------------------------------------------- /packages/core/minos-microservice-common/tests/test_common/__init__.py: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /packages/core/minos-microservice-common/tests/test_common/test_config/__init__.py: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /packages/core/minos-microservice-common/tests/test_common/test_config/test_v1/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minos-framework/minos-python/3427fdaed489d3b9330c80ce15d77975e0135b9c/packages/core/minos-microservice-common/tests/test_common/test_config/test_v1/__init__.py -------------------------------------------------------------------------------- /packages/core/minos-microservice-common/tests/test_common/test_config/test_v2/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minos-framework/minos-python/3427fdaed489d3b9330c80ce15d77975e0135b9c/packages/core/minos-microservice-common/tests/test_common/test_config/test_v2/__init__.py -------------------------------------------------------------------------------- /packages/core/minos-microservice-common/tests/test_common/test_database/__init__.py: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /packages/core/minos-microservice-common/tests/test_common/test_database/test_clients/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minos-framework/minos-python/3427fdaed489d3b9330c80ce15d77975e0135b9c/packages/core/minos-microservice-common/tests/test_common/test_database/test_clients/__init__.py -------------------------------------------------------------------------------- /packages/core/minos-microservice-common/tests/test_common/test_injections/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minos-framework/minos-python/3427fdaed489d3b9330c80ce15d77975e0135b9c/packages/core/minos-microservice-common/tests/test_common/test_injections/__init__.py -------------------------------------------------------------------------------- /packages/core/minos-microservice-common/tests/test_common/test_injections/test_mixins.py: -------------------------------------------------------------------------------- 1 | import unittest 2 | 3 | from minos.common import ( 4 | InjectableMixin, 5 | ) 6 | 7 | 8 | class _InjectableMixin(InjectableMixin): 9 | """For testing purposes.""" 10 | 11 | 12 | class TestInjectableMixin(unittest.TestCase): 13 | def test_set_get_injectable_name(self): 14 | with self.assertRaises(AttributeError): 15 | _InjectableMixin.get_injectable_name() 16 | _InjectableMixin._set_injectable_name("foo") 17 | self.assertEqual("foo", _InjectableMixin.get_injectable_name()) 18 | 19 | 20 | if __name__ == "__main__": 21 | unittest.main() 22 | -------------------------------------------------------------------------------- /packages/core/minos-microservice-common/tests/test_common/test_model/__init__.py: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /packages/core/minos-microservice-common/tests/test_common/test_model/test_declarative/__init__.py: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /packages/core/minos-microservice-common/tests/test_common/test_model/test_dynamic/__init__.py: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /packages/core/minos-microservice-common/tests/test_common/test_model/test_dynamic/test_bucket.py: -------------------------------------------------------------------------------- 1 | import unittest 2 | 3 | from minos.common import ( 4 | BucketModel, 5 | ) 6 | 7 | 8 | class TestBucketModel(unittest.IsolatedAsyncioTestCase): 9 | def test_empty(self): 10 | expected = BucketModel({}) 11 | observed = BucketModel.empty() 12 | self.assertEqual(expected, observed) 13 | 14 | 15 | if __name__ == "__main__": 16 | unittest.main() 17 | -------------------------------------------------------------------------------- /packages/core/minos-microservice-common/tests/test_common/test_model/test_serializers/__init__.py: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /packages/core/minos-microservice-common/tests/test_common/test_model/test_serializers/test_avro/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minos-framework/minos-python/3427fdaed489d3b9330c80ce15d77975e0135b9c/packages/core/minos-microservice-common/tests/test_common/test_model/test_serializers/test_avro/__init__.py -------------------------------------------------------------------------------- /packages/core/minos-microservice-common/tests/test_common/test_model/test_serializers/test_avro/test_data/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minos-framework/minos-python/3427fdaed489d3b9330c80ce15d77975e0135b9c/packages/core/minos-microservice-common/tests/test_common/test_model/test_serializers/test_avro/test_data/__init__.py -------------------------------------------------------------------------------- /packages/core/minos-microservice-common/tests/test_common/test_model/test_serializers/test_avro/test_schema/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minos-framework/minos-python/3427fdaed489d3b9330c80ce15d77975e0135b9c/packages/core/minos-microservice-common/tests/test_common/test_model/test_serializers/test_avro/test_schema/__init__.py -------------------------------------------------------------------------------- /packages/core/minos-microservice-common/tests/test_common/test_model/test_types/__init__.py: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /packages/core/minos-microservice-common/tests/test_common/test_model/test_types/test_constants.py: -------------------------------------------------------------------------------- 1 | import unittest 2 | 3 | from minos.common import ( 4 | MissingSentinel, 5 | NoneType, 6 | ) 7 | 8 | 9 | class TestNoneType(unittest.TestCase): 10 | def test_equal(self): 11 | self.assertEqual(type(None), NoneType) 12 | 13 | 14 | class TestMissingSentinel(unittest.TestCase): 15 | def test_subclass(self): 16 | self.assertTrue(issubclass(MissingSentinel, object)) 17 | 18 | 19 | if __name__ == "__main__": 20 | unittest.main() 21 | -------------------------------------------------------------------------------- /packages/core/minos-microservice-common/tests/test_common/test_object.py: -------------------------------------------------------------------------------- 1 | import unittest 2 | 3 | from minos.common import ( 4 | Object, 5 | ) 6 | 7 | 8 | class TestObject(unittest.TestCase): 9 | def test_empty(self): 10 | obj = Object() 11 | self.assertIsInstance(obj, Object) 12 | 13 | def test_args_kwargs(self): 14 | obj = Object("foo", bar="foobar") 15 | self.assertIsInstance(obj, Object) 16 | 17 | def test_comparisons(self): 18 | self.assertNotEqual(Object(), Object()) 19 | 20 | 21 | if __name__ == "__main__": 22 | unittest.main() 23 | -------------------------------------------------------------------------------- /packages/core/minos-microservice-common/tests/test_common/test_protocol/__init__.py: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /packages/core/minos-microservice-common/tests/test_common/test_protocol/test_avro/__init__.py: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /packages/core/minos-microservice-common/tests/test_common/test_protocol/test_json.py: -------------------------------------------------------------------------------- 1 | import unittest 2 | 3 | from minos.common import ( 4 | MinosJsonBinaryProtocol, 5 | ) 6 | 7 | 8 | class TestMinosJsonBinaryProtocol(unittest.TestCase): 9 | def test_encode_decode(self): 10 | data = {"foo": "bar", "one": 2, "arr": [{"a": "b"}]} 11 | encoded = MinosJsonBinaryProtocol.encode(data) 12 | self.assertIsInstance(encoded, bytes) 13 | 14 | decoded = MinosJsonBinaryProtocol.decode(encoded) 15 | self.assertEqual(data, decoded) 16 | 17 | 18 | if __name__ == "__main__": 19 | unittest.main() 20 | -------------------------------------------------------------------------------- /packages/core/minos-microservice-common/tests/test_common/test_uuid.py: -------------------------------------------------------------------------------- 1 | import unittest 2 | from uuid import ( 3 | uuid4, 4 | ) 5 | 6 | from minos.common import ( 7 | NULL_UUID, 8 | UUID_REGEX, 9 | ) 10 | 11 | 12 | class TestUuids(unittest.TestCase): 13 | def test_null_uuid(self): 14 | self.assertEqual(r"00000000-0000-0000-0000-000000000000", str(NULL_UUID)) 15 | 16 | def test_uuid_regex(self): 17 | uuid = str(uuid4()) 18 | self.assertRegex(uuid, UUID_REGEX) 19 | 20 | 21 | if __name__ == "__main__": 22 | unittest.main() 23 | -------------------------------------------------------------------------------- /packages/core/minos-microservice-cqrs/AUTHORS.md: -------------------------------------------------------------------------------- 1 | # Credits 2 | 3 | ## Development Lead 4 | 5 | * Andrea Mucci 6 | 7 | ## Core Devs 8 | 9 | * Sergio Garcia Prado 10 | * Vladyslav Fenchak 11 | * Alberto Amigo Alonso 12 | 13 | ## Contributors 14 | 15 | None yet. Why not be the first? 16 | -------------------------------------------------------------------------------- /packages/core/minos-microservice-cqrs/Makefile: -------------------------------------------------------------------------------- 1 | .PHONY: docs dist 2 | 3 | lint: 4 | poetry run flake8 5 | 6 | test: 7 | poetry run pytest 8 | 9 | coverage: 10 | poetry run coverage run -m pytest 11 | poetry run coverage report -m 12 | poetry run coverage xml 13 | 14 | reformat: 15 | poetry run black --line-length 120 minos tests 16 | poetry run isort minos tests 17 | 18 | release: 19 | $(MAKE) dist 20 | poetry publish 21 | 22 | dist: 23 | poetry build 24 | ls -l dist 25 | 26 | install: 27 | poetry install 28 | 29 | update: 30 | poetry update 31 | 32 | check: 33 | $(MAKE) install 34 | $(MAKE) reformat 35 | $(MAKE) lint 36 | $(MAKE) test 37 | $(MAKE) dist 38 | -------------------------------------------------------------------------------- /packages/core/minos-microservice-cqrs/RUNTHETESTS.md: -------------------------------------------------------------------------------- 1 | # Run the tests 2 | 3 | In order to run the tests, please make sure you have the `Docker Engine `_ 4 | and `Docker Compose `_ installed. 5 | 6 | Move into tests/ directory 7 | 8 | `cd tests/` 9 | 10 | Run service dependencies: 11 | 12 | `docker-compose up -d` 13 | 14 | Install library dependencies: 15 | 16 | `make install` 17 | 18 | Run tests: 19 | 20 | `make test` 21 | -------------------------------------------------------------------------------- /packages/core/minos-microservice-cqrs/minos/cqrs/__init__.py: -------------------------------------------------------------------------------- 1 | """The CQRS pattern of the Minos Framework.""" 2 | 3 | __author__ = "Minos Framework Devs" 4 | __email__ = "hey@minos.run" 5 | __version__ = "0.7.0" 6 | 7 | from .exceptions import ( 8 | MinosCqrsException, 9 | MinosIllegalHandlingException, 10 | MinosNotAnyMissingReferenceException, 11 | MinosQueryServiceException, 12 | ) 13 | from .handlers import ( 14 | PreEventHandler, 15 | ) 16 | from .services import ( 17 | CommandService, 18 | QueryService, 19 | Service, 20 | ) 21 | -------------------------------------------------------------------------------- /packages/core/minos-microservice-cqrs/poetry.toml: -------------------------------------------------------------------------------- 1 | [virtualenvs] 2 | in-project = true 3 | -------------------------------------------------------------------------------- /packages/core/minos-microservice-cqrs/setup.cfg: -------------------------------------------------------------------------------- 1 | [coverage:run] 2 | source = 3 | minos 4 | 5 | [coverage:report] 6 | exclude_lines = 7 | pragma: no cover 8 | raise NotImplementedError 9 | if TYPE_CHECKING: 10 | pass 11 | precision = 2 12 | 13 | [flake8] 14 | filename = 15 | ./minos/**/*.py, 16 | ./tests/**/*.py, 17 | ./examples/**/*.py 18 | max-line-length = 120 19 | per-file-ignores = 20 | ./**/__init__.py:F401,W391 21 | 22 | [isort] 23 | known_first_party=minos 24 | multi_line_output = 3 25 | include_trailing_comma = True 26 | force_grid_wrap = 1 27 | use_parentheses = True 28 | line_length = 120 29 | -------------------------------------------------------------------------------- /packages/core/minos-microservice-cqrs/tests/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minos-framework/minos-python/3427fdaed489d3b9330c80ce15d77975e0135b9c/packages/core/minos-microservice-cqrs/tests/__init__.py -------------------------------------------------------------------------------- /packages/core/minos-microservice-cqrs/tests/test_cqrs/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minos-framework/minos-python/3427fdaed489d3b9330c80ce15d77975e0135b9c/packages/core/minos-microservice-cqrs/tests/test_cqrs/__init__.py -------------------------------------------------------------------------------- /packages/core/minos-microservice-networks/AUTHORS.md: -------------------------------------------------------------------------------- 1 | # Credits 2 | 3 | ## Development Lead 4 | 5 | * Andrea Mucci 6 | 7 | ## Core Devs 8 | 9 | * Sergio Garcia Prado 10 | * Vladyslav Fenchak 11 | * Alberto Amigo Alonso 12 | 13 | ## Contributors 14 | 15 | None yet. Why not be the first? 16 | -------------------------------------------------------------------------------- /packages/core/minos-microservice-networks/Makefile: -------------------------------------------------------------------------------- 1 | .PHONY: docs dist 2 | 3 | lint: 4 | poetry run flake8 5 | 6 | test: 7 | poetry run pytest 8 | 9 | coverage: 10 | poetry run coverage run -m pytest 11 | poetry run coverage report -m 12 | poetry run coverage xml 13 | 14 | reformat: 15 | poetry run black --line-length 120 minos tests 16 | poetry run isort minos tests 17 | 18 | release: 19 | $(MAKE) dist 20 | poetry publish 21 | 22 | dist: 23 | poetry build 24 | ls -l dist 25 | 26 | install: 27 | poetry install 28 | 29 | update: 30 | poetry update 31 | 32 | check: 33 | $(MAKE) install 34 | $(MAKE) reformat 35 | $(MAKE) lint 36 | $(MAKE) test 37 | $(MAKE) dist 38 | -------------------------------------------------------------------------------- /packages/core/minos-microservice-networks/RUNTHETESTS.md: -------------------------------------------------------------------------------- 1 | # Run the tests 2 | 3 | In order to run the tests, please make sure you have the `Docker Engine `_ 4 | and `Docker Compose `_ installed. 5 | 6 | Move into tests/ directory 7 | 8 | `cd tests/` 9 | 10 | Run service dependencies: 11 | 12 | `docker-compose up -d` 13 | 14 | Install library dependencies: 15 | 16 | `make install` 17 | 18 | Run tests: 19 | 20 | `make test` 21 | -------------------------------------------------------------------------------- /packages/core/minos-microservice-networks/minos/networks/brokers/collections/__init__.py: -------------------------------------------------------------------------------- 1 | from .queues import ( 2 | BrokerQueue, 3 | BrokerQueueDatabaseOperationFactory, 4 | DatabaseBrokerQueue, 5 | DatabaseBrokerQueueBuilder, 6 | InMemoryBrokerQueue, 7 | ) 8 | -------------------------------------------------------------------------------- /packages/core/minos-microservice-networks/minos/networks/brokers/collections/queues/__init__.py: -------------------------------------------------------------------------------- 1 | from .abc import ( 2 | BrokerQueue, 3 | ) 4 | from .database import ( 5 | BrokerQueueDatabaseOperationFactory, 6 | DatabaseBrokerQueue, 7 | DatabaseBrokerQueueBuilder, 8 | ) 9 | from .memory import ( 10 | InMemoryBrokerQueue, 11 | ) 12 | -------------------------------------------------------------------------------- /packages/core/minos-microservice-networks/minos/networks/brokers/collections/queues/database/__init__.py: -------------------------------------------------------------------------------- 1 | from .factories import ( 2 | BrokerQueueDatabaseOperationFactory, 3 | ) 4 | from .impl import ( 5 | DatabaseBrokerQueue, 6 | DatabaseBrokerQueueBuilder, 7 | ) 8 | -------------------------------------------------------------------------------- /packages/core/minos-microservice-networks/minos/networks/brokers/dispatchers/__init__.py: -------------------------------------------------------------------------------- 1 | from .impl import ( 2 | BrokerDispatcher, 3 | ) 4 | from .requests import ( 5 | BrokerRequest, 6 | BrokerResponse, 7 | BrokerResponseException, 8 | ) 9 | -------------------------------------------------------------------------------- /packages/core/minos-microservice-networks/minos/networks/brokers/handlers/__init__.py: -------------------------------------------------------------------------------- 1 | from .impl import ( 2 | BrokerHandler, 3 | ) 4 | from .ports import ( 5 | BrokerHandlerService, 6 | BrokerPort, 7 | ) 8 | -------------------------------------------------------------------------------- /packages/core/minos-microservice-networks/minos/networks/brokers/messages/__init__.py: -------------------------------------------------------------------------------- 1 | from .contextvars import ( 2 | REQUEST_HEADERS_CONTEXT_VAR, 3 | REQUEST_REPLY_TOPIC_CONTEXT_VAR, 4 | ) 5 | from .models import ( 6 | BrokerMessage, 7 | BrokerMessageV1, 8 | BrokerMessageV1Payload, 9 | BrokerMessageV1Status, 10 | BrokerMessageV1Strategy, 11 | ) 12 | -------------------------------------------------------------------------------- /packages/core/minos-microservice-networks/minos/networks/brokers/messages/contextvars.py: -------------------------------------------------------------------------------- 1 | from contextvars import ( 2 | ContextVar, 3 | ) 4 | from typing import ( 5 | Final, 6 | Optional, 7 | ) 8 | 9 | REQUEST_REPLY_TOPIC_CONTEXT_VAR: Final[ContextVar[Optional[str]]] = ContextVar("reply_topic", default=None) 10 | REQUEST_HEADERS_CONTEXT_VAR: Final[ContextVar[Optional[dict[str, str]]]] = ContextVar("headers", default=None) 11 | -------------------------------------------------------------------------------- /packages/core/minos-microservice-networks/minos/networks/brokers/messages/models/__init__.py: -------------------------------------------------------------------------------- 1 | from .abc import ( 2 | BrokerMessage, 3 | ) 4 | from .v1 import ( 5 | BrokerMessageV1, 6 | BrokerMessageV1Payload, 7 | BrokerMessageV1Status, 8 | BrokerMessageV1Strategy, 9 | ) 10 | -------------------------------------------------------------------------------- /packages/core/minos-microservice-networks/minos/networks/brokers/publishers/__init__.py: -------------------------------------------------------------------------------- 1 | from .abc import ( 2 | BrokerPublisher, 3 | BrokerPublisherBuilder, 4 | ) 5 | from .memory import ( 6 | InMemoryBrokerPublisher, 7 | ) 8 | from .queued import ( 9 | BrokerPublisherQueue, 10 | BrokerPublisherQueueDatabaseOperationFactory, 11 | DatabaseBrokerPublisherQueue, 12 | InMemoryBrokerPublisherQueue, 13 | QueuedBrokerPublisher, 14 | ) 15 | -------------------------------------------------------------------------------- /packages/core/minos-microservice-networks/minos/networks/brokers/publishers/queued/__init__.py: -------------------------------------------------------------------------------- 1 | from .impl import ( 2 | QueuedBrokerPublisher, 3 | ) 4 | from .queues import ( 5 | BrokerPublisherQueue, 6 | BrokerPublisherQueueDatabaseOperationFactory, 7 | DatabaseBrokerPublisherQueue, 8 | InMemoryBrokerPublisherQueue, 9 | ) 10 | -------------------------------------------------------------------------------- /packages/core/minos-microservice-networks/minos/networks/brokers/publishers/queued/queues/__init__.py: -------------------------------------------------------------------------------- 1 | from .abc import ( 2 | BrokerPublisherQueue, 3 | ) 4 | from .database import ( 5 | BrokerPublisherQueueDatabaseOperationFactory, 6 | DatabaseBrokerPublisherQueue, 7 | ) 8 | from .memory import ( 9 | InMemoryBrokerPublisherQueue, 10 | ) 11 | -------------------------------------------------------------------------------- /packages/core/minos-microservice-networks/minos/networks/brokers/publishers/queued/queues/abc.py: -------------------------------------------------------------------------------- 1 | import logging 2 | from abc import ( 3 | ABC, 4 | ) 5 | 6 | from ....collections import ( 7 | BrokerQueue, 8 | ) 9 | 10 | logger = logging.getLogger(__name__) 11 | 12 | 13 | class BrokerPublisherQueue(BrokerQueue, ABC): 14 | """Broker Publisher Queue class.""" 15 | -------------------------------------------------------------------------------- /packages/core/minos-microservice-networks/minos/networks/brokers/publishers/queued/queues/memory.py: -------------------------------------------------------------------------------- 1 | import logging 2 | 3 | from ....collections import ( 4 | InMemoryBrokerQueue, 5 | ) 6 | from .abc import ( 7 | BrokerPublisherQueue, 8 | ) 9 | 10 | logger = logging.getLogger(__name__) 11 | 12 | 13 | class InMemoryBrokerPublisherQueue(InMemoryBrokerQueue, BrokerPublisherQueue): 14 | """In Memory Broker Publisher Queue class.""" 15 | -------------------------------------------------------------------------------- /packages/core/minos-microservice-networks/minos/networks/brokers/subscribers/filtered/__init__.py: -------------------------------------------------------------------------------- 1 | from .impl import ( 2 | FilteredBrokerSubscriber, 3 | ) 4 | from .validators import ( 5 | BrokerSubscriberDuplicateValidator, 6 | BrokerSubscriberDuplicateValidatorDatabaseOperationFactory, 7 | BrokerSubscriberValidator, 8 | DatabaseBrokerSubscriberDuplicateValidator, 9 | DatabaseBrokerSubscriberDuplicateValidatorBuilder, 10 | InMemoryBrokerSubscriberDuplicateValidator, 11 | ) 12 | -------------------------------------------------------------------------------- /packages/core/minos-microservice-networks/minos/networks/brokers/subscribers/filtered/validators/__init__.py: -------------------------------------------------------------------------------- 1 | from .abc import ( 2 | BrokerSubscriberValidator, 3 | ) 4 | from .duplicates import ( 5 | BrokerSubscriberDuplicateValidator, 6 | BrokerSubscriberDuplicateValidatorDatabaseOperationFactory, 7 | DatabaseBrokerSubscriberDuplicateValidator, 8 | DatabaseBrokerSubscriberDuplicateValidatorBuilder, 9 | InMemoryBrokerSubscriberDuplicateValidator, 10 | ) 11 | -------------------------------------------------------------------------------- /packages/core/minos-microservice-networks/minos/networks/brokers/subscribers/filtered/validators/duplicates/__init__.py: -------------------------------------------------------------------------------- 1 | from .abc import ( 2 | BrokerSubscriberDuplicateValidator, 3 | ) 4 | from .database import ( 5 | BrokerSubscriberDuplicateValidatorDatabaseOperationFactory, 6 | DatabaseBrokerSubscriberDuplicateValidator, 7 | DatabaseBrokerSubscriberDuplicateValidatorBuilder, 8 | ) 9 | from .memory import ( 10 | InMemoryBrokerSubscriberDuplicateValidator, 11 | ) 12 | -------------------------------------------------------------------------------- /packages/core/minos-microservice-networks/minos/networks/brokers/subscribers/filtered/validators/duplicates/database/__init__.py: -------------------------------------------------------------------------------- 1 | from .factories import ( 2 | BrokerSubscriberDuplicateValidatorDatabaseOperationFactory, 3 | ) 4 | from .impl import ( 5 | DatabaseBrokerSubscriberDuplicateValidator, 6 | DatabaseBrokerSubscriberDuplicateValidatorBuilder, 7 | ) 8 | -------------------------------------------------------------------------------- /packages/core/minos-microservice-networks/minos/networks/brokers/subscribers/queued/__init__.py: -------------------------------------------------------------------------------- 1 | from .impl import ( 2 | QueuedBrokerSubscriber, 3 | QueuedBrokerSubscriberBuilder, 4 | ) 5 | from .queues import ( 6 | BrokerSubscriberQueue, 7 | BrokerSubscriberQueueBuilder, 8 | BrokerSubscriberQueueDatabaseOperationFactory, 9 | DatabaseBrokerSubscriberQueue, 10 | DatabaseBrokerSubscriberQueueBuilder, 11 | InMemoryBrokerSubscriberQueue, 12 | InMemoryBrokerSubscriberQueueBuilder, 13 | ) 14 | -------------------------------------------------------------------------------- /packages/core/minos-microservice-networks/minos/networks/brokers/subscribers/queued/queues/__init__.py: -------------------------------------------------------------------------------- 1 | from .abc import ( 2 | BrokerSubscriberQueue, 3 | BrokerSubscriberQueueBuilder, 4 | ) 5 | from .database import ( 6 | BrokerSubscriberQueueDatabaseOperationFactory, 7 | DatabaseBrokerSubscriberQueue, 8 | DatabaseBrokerSubscriberQueueBuilder, 9 | ) 10 | from .memory import ( 11 | InMemoryBrokerSubscriberQueue, 12 | InMemoryBrokerSubscriberQueueBuilder, 13 | ) 14 | -------------------------------------------------------------------------------- /packages/core/minos-microservice-networks/minos/networks/brokers/subscribers/queued/queues/database/__init__.py: -------------------------------------------------------------------------------- 1 | from .factories import ( 2 | BrokerSubscriberQueueDatabaseOperationFactory, 3 | ) 4 | from .impl import ( 5 | DatabaseBrokerSubscriberQueue, 6 | DatabaseBrokerSubscriberQueueBuilder, 7 | ) 8 | -------------------------------------------------------------------------------- /packages/core/minos-microservice-networks/minos/networks/decorators/callables/__init__.py: -------------------------------------------------------------------------------- 1 | from .checkers import ( 2 | Checker, 3 | CheckerMeta, 4 | CheckerWrapper, 5 | ) 6 | from .handlers import ( 7 | Handler, 8 | HandlerMeta, 9 | HandlerWrapper, 10 | ) 11 | -------------------------------------------------------------------------------- /packages/core/minos-microservice-networks/minos/networks/decorators/definitions/__init__.py: -------------------------------------------------------------------------------- 1 | from .abc import ( 2 | EnrouteDecorator, 3 | ) 4 | from .broker import ( 5 | BrokerCommandEnrouteDecorator, 6 | BrokerEnrouteDecorator, 7 | BrokerEventEnrouteDecorator, 8 | BrokerQueryEnrouteDecorator, 9 | ) 10 | from .checkers import ( 11 | CheckDecorator, 12 | ) 13 | from .http import ( 14 | HttpEnrouteDecorator, 15 | RestCommandEnrouteDecorator, 16 | RestEnrouteDecorator, 17 | RestQueryEnrouteDecorator, 18 | ) 19 | from .kinds import ( 20 | EnrouteDecoratorKind, 21 | ) 22 | from .periodic import ( 23 | PeriodicEnrouteDecorator, 24 | PeriodicEventEnrouteDecorator, 25 | ) 26 | -------------------------------------------------------------------------------- /packages/core/minos-microservice-networks/minos/networks/decorators/definitions/http/__init__.py: -------------------------------------------------------------------------------- 1 | from .abc import ( 2 | HttpEnrouteDecorator, 3 | ) 4 | from .rest import ( 5 | RestCommandEnrouteDecorator, 6 | RestEnrouteDecorator, 7 | RestQueryEnrouteDecorator, 8 | ) 9 | -------------------------------------------------------------------------------- /packages/core/minos-microservice-networks/minos/networks/discovery/__init__.py: -------------------------------------------------------------------------------- 1 | from .clients import ( 2 | DiscoveryClient, 3 | InMemoryDiscoveryClient, 4 | ) 5 | from .connectors import ( 6 | DiscoveryConnector, 7 | ) 8 | -------------------------------------------------------------------------------- /packages/core/minos-microservice-networks/minos/networks/discovery/clients/__init__.py: -------------------------------------------------------------------------------- 1 | from .abc import ( 2 | DiscoveryClient, 3 | ) 4 | from .memory import ( 5 | InMemoryDiscoveryClient, 6 | ) 7 | -------------------------------------------------------------------------------- /packages/core/minos-microservice-networks/minos/networks/http/__init__.py: -------------------------------------------------------------------------------- 1 | from .adapters import ( 2 | HttpAdapter, 3 | ) 4 | from .connectors import ( 5 | HttpConnector, 6 | ) 7 | from .ports import ( 8 | HttpPort, 9 | RestService, 10 | ) 11 | from .requests import ( 12 | HttpRequest, 13 | HttpResponse, 14 | HttpResponseException, 15 | ) 16 | -------------------------------------------------------------------------------- /packages/core/minos-microservice-networks/minos/networks/requests/__init__.py: -------------------------------------------------------------------------------- 1 | from .abc import ( 2 | REQUEST_USER_CONTEXT_VAR, 3 | Request, 4 | Response, 5 | ResponseException, 6 | ) 7 | from .memory import ( 8 | InMemoryRequest, 9 | ) 10 | from .wrapped import ( 11 | WrappedRequest, 12 | ) 13 | -------------------------------------------------------------------------------- /packages/core/minos-microservice-networks/minos/networks/scheduling/__init__.py: -------------------------------------------------------------------------------- 1 | from .crontab import ( 2 | CronTab, 3 | ) 4 | from .ports import ( 5 | PeriodicPort, 6 | PeriodicTaskSchedulerService, 7 | ) 8 | from .requests import ( 9 | ScheduledRequest, 10 | ScheduledRequestContent, 11 | ScheduledResponseException, 12 | ) 13 | from .schedulers import ( 14 | PeriodicTask, 15 | PeriodicTaskScheduler, 16 | ) 17 | -------------------------------------------------------------------------------- /packages/core/minos-microservice-networks/minos/networks/specs/__init__.py: -------------------------------------------------------------------------------- 1 | from .asyncapi import ( 2 | AsyncAPIService, 3 | ) 4 | from .openapi import ( 5 | OpenAPIService, 6 | ) 7 | -------------------------------------------------------------------------------- /packages/core/minos-microservice-networks/minos/networks/system/__init__.py: -------------------------------------------------------------------------------- 1 | from .services import ( 2 | SystemService, 3 | ) 4 | -------------------------------------------------------------------------------- /packages/core/minos-microservice-networks/minos/networks/system/services.py: -------------------------------------------------------------------------------- 1 | from ..decorators import ( 2 | enroute, 3 | ) 4 | from ..requests import ( 5 | Request, 6 | Response, 7 | ) 8 | from ..utils import ( 9 | get_host_ip, 10 | ) 11 | 12 | 13 | class SystemService: 14 | """System Service class.""" 15 | 16 | # noinspection PyUnusedLocal 17 | @enroute.rest.command("/system/health", "GET") 18 | def check_health(self, request: Request) -> Response: 19 | """Get the system health. 20 | 21 | :param request: The given request. 22 | :return: A Response containing the system status. 23 | """ 24 | return Response({"host": get_host_ip()}) 25 | -------------------------------------------------------------------------------- /packages/core/minos-microservice-networks/minos/networks/testing/__init__.py: -------------------------------------------------------------------------------- 1 | from .brokers import ( 2 | MockedBrokerPublisherQueueDatabaseOperationFactory, 3 | MockedBrokerQueueDatabaseOperationFactory, 4 | MockedBrokerSubscriberDuplicateValidatorDatabaseOperationFactory, 5 | MockedBrokerSubscriberQueueDatabaseOperationFactory, 6 | ) 7 | -------------------------------------------------------------------------------- /packages/core/minos-microservice-networks/minos/networks/testing/brokers/__init__.py: -------------------------------------------------------------------------------- 1 | from .collections import ( 2 | MockedBrokerQueueDatabaseOperationFactory, 3 | ) 4 | from .publishers import ( 5 | MockedBrokerPublisherQueueDatabaseOperationFactory, 6 | ) 7 | from .subscribers import ( 8 | MockedBrokerSubscriberDuplicateValidatorDatabaseOperationFactory, 9 | MockedBrokerSubscriberQueueDatabaseOperationFactory, 10 | ) 11 | -------------------------------------------------------------------------------- /packages/core/minos-microservice-networks/minos/networks/testing/brokers/collections/__init__.py: -------------------------------------------------------------------------------- 1 | from .queues import ( 2 | MockedBrokerQueueDatabaseOperationFactory, 3 | ) 4 | -------------------------------------------------------------------------------- /packages/core/minos-microservice-networks/minos/networks/testing/brokers/publishers/__init__.py: -------------------------------------------------------------------------------- 1 | from .queues import ( 2 | MockedBrokerPublisherQueueDatabaseOperationFactory, 3 | ) 4 | -------------------------------------------------------------------------------- /packages/core/minos-microservice-networks/minos/networks/testing/brokers/subscribers/__init__.py: -------------------------------------------------------------------------------- 1 | from .queues import ( 2 | MockedBrokerSubscriberQueueDatabaseOperationFactory, 3 | ) 4 | from .validators import ( 5 | MockedBrokerSubscriberDuplicateValidatorDatabaseOperationFactory, 6 | ) 7 | -------------------------------------------------------------------------------- /packages/core/minos-microservice-networks/poetry.toml: -------------------------------------------------------------------------------- 1 | [virtualenvs] 2 | in-project = true 3 | -------------------------------------------------------------------------------- /packages/core/minos-microservice-networks/setup.cfg: -------------------------------------------------------------------------------- 1 | [coverage:run] 2 | source = 3 | minos 4 | 5 | [coverage:report] 6 | exclude_lines = 7 | pragma: no cover 8 | raise NotImplementedError 9 | if TYPE_CHECKING: 10 | pass 11 | precision = 2 12 | 13 | [flake8] 14 | filename = 15 | ./minos/**/*.py, 16 | ./tests/**/*.py, 17 | ./examples/**/*.py 18 | max-line-length = 120 19 | per-file-ignores = 20 | ./**/__init__.py:F401,W391 21 | 22 | [isort] 23 | known_first_party=minos 24 | multi_line_output = 3 25 | include_trailing_comma = True 26 | force_grid_wrap = 1 27 | use_parentheses = True 28 | line_length = 120 29 | -------------------------------------------------------------------------------- /packages/core/minos-microservice-networks/tests/__init__.py: -------------------------------------------------------------------------------- 1 | """Unit test package for minos_microservice_networks.""" 2 | -------------------------------------------------------------------------------- /packages/core/minos-microservice-networks/tests/docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: '2' 2 | services: 3 | postgres: 4 | image: postgres:alpine 5 | network_mode: host 6 | environment: 7 | POSTGRES_USER: minos 8 | POSTGRES_PASSWORD: min0s 9 | POSTGRES_DB: order_db -------------------------------------------------------------------------------- /packages/core/minos-microservice-networks/tests/services/queries.py: -------------------------------------------------------------------------------- 1 | from minos.networks import ( 2 | Request, 3 | Response, 4 | enroute, 5 | ) 6 | 7 | 8 | class QueryService: 9 | @enroute.rest.query(path="/ticket", method="POST", foo="bar") 10 | def add_ticket(self, request: Request) -> Response: 11 | return Response("ticket_added") 12 | 13 | @enroute.broker.event("TicketAdded") 14 | def ticket_added(self, request: Request): 15 | return "query_service_ticket_added" 16 | 17 | @enroute.broker.event("TicketDeleted") 18 | def ticket_deleted(self, request: Request): 19 | return "ticket_deleted" 20 | -------------------------------------------------------------------------------- /packages/core/minos-microservice-networks/tests/test_networks/__init__.py: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /packages/core/minos-microservice-networks/tests/test_networks/test_brokers/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minos-framework/minos-python/3427fdaed489d3b9330c80ce15d77975e0135b9c/packages/core/minos-microservice-networks/tests/test_networks/test_brokers/__init__.py -------------------------------------------------------------------------------- /packages/core/minos-microservice-networks/tests/test_networks/test_brokers/test_collections/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minos-framework/minos-python/3427fdaed489d3b9330c80ce15d77975e0135b9c/packages/core/minos-microservice-networks/tests/test_networks/test_brokers/test_collections/__init__.py -------------------------------------------------------------------------------- /packages/core/minos-microservice-networks/tests/test_networks/test_brokers/test_collections/test_queues/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minos-framework/minos-python/3427fdaed489d3b9330c80ce15d77975e0135b9c/packages/core/minos-microservice-networks/tests/test_networks/test_brokers/test_collections/test_queues/__init__.py -------------------------------------------------------------------------------- /packages/core/minos-microservice-networks/tests/test_networks/test_brokers/test_dispatchers/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minos-framework/minos-python/3427fdaed489d3b9330c80ce15d77975e0135b9c/packages/core/minos-microservice-networks/tests/test_networks/test_brokers/test_dispatchers/__init__.py -------------------------------------------------------------------------------- /packages/core/minos-microservice-networks/tests/test_networks/test_brokers/test_handlers/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minos-framework/minos-python/3427fdaed489d3b9330c80ce15d77975e0135b9c/packages/core/minos-microservice-networks/tests/test_networks/test_brokers/test_handlers/__init__.py -------------------------------------------------------------------------------- /packages/core/minos-microservice-networks/tests/test_networks/test_brokers/test_messages/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minos-framework/minos-python/3427fdaed489d3b9330c80ce15d77975e0135b9c/packages/core/minos-microservice-networks/tests/test_networks/test_brokers/test_messages/__init__.py -------------------------------------------------------------------------------- /packages/core/minos-microservice-networks/tests/test_networks/test_brokers/test_messages/test_models/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minos-framework/minos-python/3427fdaed489d3b9330c80ce15d77975e0135b9c/packages/core/minos-microservice-networks/tests/test_networks/test_brokers/test_messages/test_models/__init__.py -------------------------------------------------------------------------------- /packages/core/minos-microservice-networks/tests/test_networks/test_brokers/test_publishers/__init__.py: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /packages/core/minos-microservice-networks/tests/test_networks/test_brokers/test_publishers/test_queued/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minos-framework/minos-python/3427fdaed489d3b9330c80ce15d77975e0135b9c/packages/core/minos-microservice-networks/tests/test_networks/test_brokers/test_publishers/test_queued/__init__.py -------------------------------------------------------------------------------- /packages/core/minos-microservice-networks/tests/test_networks/test_brokers/test_publishers/test_queued/test_queues/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minos-framework/minos-python/3427fdaed489d3b9330c80ce15d77975e0135b9c/packages/core/minos-microservice-networks/tests/test_networks/test_brokers/test_publishers/test_queued/test_queues/__init__.py -------------------------------------------------------------------------------- /packages/core/minos-microservice-networks/tests/test_networks/test_brokers/test_publishers/test_queued/test_queues/test_abc.py: -------------------------------------------------------------------------------- 1 | import unittest 2 | from abc import ( 3 | ABC, 4 | ) 5 | 6 | from minos.networks import ( 7 | BrokerPublisherQueue, 8 | BrokerQueue, 9 | ) 10 | 11 | 12 | class TestBrokerPublisherQueue(unittest.IsolatedAsyncioTestCase): 13 | def test_abstract(self): 14 | self.assertTrue(issubclass(BrokerPublisherQueue, (ABC, BrokerQueue))) 15 | # noinspection PyUnresolvedReferences 16 | self.assertEqual({"_enqueue", "_dequeue"}, BrokerPublisherQueue.__abstractmethods__) 17 | 18 | 19 | if __name__ == "__main__": 20 | unittest.main() 21 | -------------------------------------------------------------------------------- /packages/core/minos-microservice-networks/tests/test_networks/test_brokers/test_publishers/test_queued/test_queues/test_memory.py: -------------------------------------------------------------------------------- 1 | import unittest 2 | 3 | from minos.networks import ( 4 | BrokerPublisherQueue, 5 | InMemoryBrokerPublisherQueue, 6 | InMemoryBrokerQueue, 7 | ) 8 | 9 | 10 | class TestInMemoryBrokerPublisherQueue(unittest.IsolatedAsyncioTestCase): 11 | def test_is_subclass(self): 12 | self.assertTrue(issubclass(InMemoryBrokerPublisherQueue, (InMemoryBrokerQueue, BrokerPublisherQueue))) 13 | 14 | 15 | if __name__ == "__main__": 16 | unittest.main() 17 | -------------------------------------------------------------------------------- /packages/core/minos-microservice-networks/tests/test_networks/test_brokers/test_subscribers/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minos-framework/minos-python/3427fdaed489d3b9330c80ce15d77975e0135b9c/packages/core/minos-microservice-networks/tests/test_networks/test_brokers/test_subscribers/__init__.py -------------------------------------------------------------------------------- /packages/core/minos-microservice-networks/tests/test_networks/test_brokers/test_subscribers/test_filtered/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minos-framework/minos-python/3427fdaed489d3b9330c80ce15d77975e0135b9c/packages/core/minos-microservice-networks/tests/test_networks/test_brokers/test_subscribers/test_filtered/__init__.py -------------------------------------------------------------------------------- /packages/core/minos-microservice-networks/tests/test_networks/test_brokers/test_subscribers/test_filtered/test_validators/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minos-framework/minos-python/3427fdaed489d3b9330c80ce15d77975e0135b9c/packages/core/minos-microservice-networks/tests/test_networks/test_brokers/test_subscribers/test_filtered/test_validators/__init__.py -------------------------------------------------------------------------------- /packages/core/minos-microservice-networks/tests/test_networks/test_brokers/test_subscribers/test_filtered/test_validators/test_duplicates/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minos-framework/minos-python/3427fdaed489d3b9330c80ce15d77975e0135b9c/packages/core/minos-microservice-networks/tests/test_networks/test_brokers/test_subscribers/test_filtered/test_validators/test_duplicates/__init__.py -------------------------------------------------------------------------------- /packages/core/minos-microservice-networks/tests/test_networks/test_brokers/test_subscribers/test_queued/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minos-framework/minos-python/3427fdaed489d3b9330c80ce15d77975e0135b9c/packages/core/minos-microservice-networks/tests/test_networks/test_brokers/test_subscribers/test_queued/__init__.py -------------------------------------------------------------------------------- /packages/core/minos-microservice-networks/tests/test_networks/test_brokers/test_subscribers/test_queued/test_queues/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minos-framework/minos-python/3427fdaed489d3b9330c80ce15d77975e0135b9c/packages/core/minos-microservice-networks/tests/test_networks/test_brokers/test_subscribers/test_queued/test_queues/__init__.py -------------------------------------------------------------------------------- /packages/core/minos-microservice-networks/tests/test_networks/test_decorators/__init__.py: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /packages/core/minos-microservice-networks/tests/test_networks/test_decorators/test_callables/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minos-framework/minos-python/3427fdaed489d3b9330c80ce15d77975e0135b9c/packages/core/minos-microservice-networks/tests/test_networks/test_decorators/test_callables/__init__.py -------------------------------------------------------------------------------- /packages/core/minos-microservice-networks/tests/test_networks/test_decorators/test_definitions/__init__.py: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /packages/core/minos-microservice-networks/tests/test_networks/test_decorators/test_definitions/test_http/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minos-framework/minos-python/3427fdaed489d3b9330c80ce15d77975e0135b9c/packages/core/minos-microservice-networks/tests/test_networks/test_decorators/test_definitions/test_http/__init__.py -------------------------------------------------------------------------------- /packages/core/minos-microservice-networks/tests/test_networks/test_discovery/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minos-framework/minos-python/3427fdaed489d3b9330c80ce15d77975e0135b9c/packages/core/minos-microservice-networks/tests/test_networks/test_discovery/__init__.py -------------------------------------------------------------------------------- /packages/core/minos-microservice-networks/tests/test_networks/test_exceptions.py: -------------------------------------------------------------------------------- 1 | import unittest 2 | 3 | from minos.common import ( 4 | MinosException, 5 | ) 6 | from minos.networks import ( 7 | MinosNetworkException, 8 | ) 9 | 10 | 11 | class TestExceptions(unittest.TestCase): 12 | def test_type(self): 13 | self.assertTrue(issubclass(MinosNetworkException, MinosException)) 14 | 15 | 16 | if __name__ == "__main__": 17 | unittest.main() 18 | -------------------------------------------------------------------------------- /packages/core/minos-microservice-networks/tests/test_networks/test_http/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minos-framework/minos-python/3427fdaed489d3b9330c80ce15d77975e0135b9c/packages/core/minos-microservice-networks/tests/test_networks/test_http/__init__.py -------------------------------------------------------------------------------- /packages/core/minos-microservice-networks/tests/test_networks/test_requests/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minos-framework/minos-python/3427fdaed489d3b9330c80ce15d77975e0135b9c/packages/core/minos-microservice-networks/tests/test_networks/test_requests/__init__.py -------------------------------------------------------------------------------- /packages/core/minos-microservice-networks/tests/test_networks/test_scheduling/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minos-framework/minos-python/3427fdaed489d3b9330c80ce15d77975e0135b9c/packages/core/minos-microservice-networks/tests/test_networks/test_scheduling/__init__.py -------------------------------------------------------------------------------- /packages/core/minos-microservice-networks/tests/test_networks/test_specs/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minos-framework/minos-python/3427fdaed489d3b9330c80ce15d77975e0135b9c/packages/core/minos-microservice-networks/tests/test_networks/test_specs/__init__.py -------------------------------------------------------------------------------- /packages/core/minos-microservice-networks/tests/test_networks/test_system/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minos-framework/minos-python/3427fdaed489d3b9330c80ce15d77975e0135b9c/packages/core/minos-microservice-networks/tests/test_networks/test_system/__init__.py -------------------------------------------------------------------------------- /packages/core/minos-microservice-saga/AUTHORS.md: -------------------------------------------------------------------------------- 1 | # Credits 2 | 3 | ## Development Lead 4 | 5 | * Andrea Mucci 6 | 7 | ## Core Devs 8 | 9 | * Sergio Garcia Prado 10 | * Vladyslav Fenchak 11 | * Alberto Amigo Alonso 12 | 13 | ## Contributors 14 | 15 | None yet. Why not be the first? 16 | -------------------------------------------------------------------------------- /packages/core/minos-microservice-saga/Makefile: -------------------------------------------------------------------------------- 1 | .PHONY: docs dist 2 | 3 | lint: 4 | poetry run flake8 5 | 6 | test: 7 | poetry run pytest 8 | 9 | coverage: 10 | poetry run coverage run -m pytest 11 | poetry run coverage report -m 12 | poetry run coverage xml 13 | 14 | reformat: 15 | poetry run black --line-length 120 minos tests 16 | poetry run isort minos tests 17 | 18 | release: 19 | $(MAKE) dist 20 | poetry publish 21 | 22 | dist: 23 | poetry build 24 | ls -l dist 25 | 26 | install: 27 | poetry install 28 | 29 | update: 30 | poetry update 31 | 32 | check: 33 | $(MAKE) install 34 | $(MAKE) reformat 35 | $(MAKE) lint 36 | $(MAKE) test 37 | $(MAKE) dist 38 | -------------------------------------------------------------------------------- /packages/core/minos-microservice-saga/RUNTHETESTS.md: -------------------------------------------------------------------------------- 1 | # Run the tests 2 | 3 | In order to run the tests, please make sure you have the `Docker Engine `_ 4 | and `Docker Compose `_ installed. 5 | 6 | Move into tests/ directory 7 | 8 | `cd tests/` 9 | 10 | Run service dependencies: 11 | 12 | `docker-compose up -d` 13 | 14 | Install library dependencies: 15 | 16 | `make install` 17 | 18 | Run tests: 19 | 20 | `make test` 21 | -------------------------------------------------------------------------------- /packages/core/minos-microservice-saga/minos/saga/definitions/__init__.py: -------------------------------------------------------------------------------- 1 | from .operations import ( 2 | SagaOperation, 3 | ) 4 | from .saga import ( 5 | Saga, 6 | ) 7 | from .steps import ( 8 | ConditionalSagaStep, 9 | ElseThenAlternative, 10 | IfThenAlternative, 11 | LocalSagaStep, 12 | RemoteSagaStep, 13 | SagaStep, 14 | ) 15 | from .types import ( 16 | LocalCallback, 17 | RequestCallBack, 18 | ResponseCallBack, 19 | ) 20 | -------------------------------------------------------------------------------- /packages/core/minos-microservice-saga/minos/saga/definitions/steps/__init__.py: -------------------------------------------------------------------------------- 1 | from .abc import ( 2 | SagaStep, 3 | ) 4 | from .conditional import ( 5 | ConditionalSagaStep, 6 | ElseThenAlternative, 7 | IfThenAlternative, 8 | ) 9 | from .local import ( 10 | LocalSagaStep, 11 | ) 12 | from .remote import ( 13 | RemoteSagaStep, 14 | ) 15 | -------------------------------------------------------------------------------- /packages/core/minos-microservice-saga/minos/saga/executions/__init__.py: -------------------------------------------------------------------------------- 1 | from .commit import ( 2 | TransactionCommitter, 3 | ) 4 | from .executors import ( 5 | Executor, 6 | LocalExecutor, 7 | RequestExecutor, 8 | ResponseExecutor, 9 | ) 10 | from .repositories import ( 11 | DatabaseSagaExecutionRepository, 12 | SagaExecutionDatabaseOperationFactory, 13 | SagaExecutionRepository, 14 | ) 15 | from .saga import ( 16 | SagaExecution, 17 | ) 18 | from .status import ( 19 | SagaStatus, 20 | SagaStepStatus, 21 | ) 22 | from .steps import ( 23 | ConditionalSagaStepExecution, 24 | LocalSagaStepExecution, 25 | RemoteSagaStepExecution, 26 | SagaStepExecution, 27 | ) 28 | -------------------------------------------------------------------------------- /packages/core/minos-microservice-saga/minos/saga/executions/executors/__init__.py: -------------------------------------------------------------------------------- 1 | from .abc import ( 2 | Executor, 3 | ) 4 | from .local import ( 5 | LocalExecutor, 6 | ) 7 | from .request import ( 8 | RequestExecutor, 9 | ) 10 | from .response import ( 11 | ResponseExecutor, 12 | ) 13 | -------------------------------------------------------------------------------- /packages/core/minos-microservice-saga/minos/saga/executions/repositories/__init__.py: -------------------------------------------------------------------------------- 1 | from .abc import ( 2 | SagaExecutionRepository, 3 | ) 4 | from .database import ( 5 | DatabaseSagaExecutionRepository, 6 | SagaExecutionDatabaseOperationFactory, 7 | ) 8 | -------------------------------------------------------------------------------- /packages/core/minos-microservice-saga/minos/saga/executions/repositories/database/__init__.py: -------------------------------------------------------------------------------- 1 | from .factories import ( 2 | SagaExecutionDatabaseOperationFactory, 3 | ) 4 | from .impl import ( 5 | DatabaseSagaExecutionRepository, 6 | ) 7 | -------------------------------------------------------------------------------- /packages/core/minos-microservice-saga/minos/saga/executions/steps/__init__.py: -------------------------------------------------------------------------------- 1 | from .abc import ( 2 | SagaStepExecution, 3 | ) 4 | from .conditional import ( 5 | ConditionalSagaStepExecution, 6 | ) 7 | from .local import ( 8 | LocalSagaStepExecution, 9 | ) 10 | from .remote import ( 11 | RemoteSagaStepExecution, 12 | ) 13 | -------------------------------------------------------------------------------- /packages/core/minos-microservice-saga/minos/saga/utils.py: -------------------------------------------------------------------------------- 1 | from __future__ import ( 2 | annotations, 3 | ) 4 | 5 | from minos.common import ( 6 | Config, 7 | Inject, 8 | NotProvidedException, 9 | ) 10 | 11 | 12 | @Inject() 13 | def get_service_name(config: Config) -> str: 14 | """Get the service name.""" 15 | if config is None: 16 | raise NotProvidedException("The config object must be provided.") 17 | return config.get_name() 18 | -------------------------------------------------------------------------------- /packages/core/minos-microservice-saga/poetry.toml: -------------------------------------------------------------------------------- 1 | [virtualenvs] 2 | in-project = true 3 | -------------------------------------------------------------------------------- /packages/core/minos-microservice-saga/setup.cfg: -------------------------------------------------------------------------------- 1 | [coverage:run] 2 | source = 3 | minos 4 | 5 | [coverage:report] 6 | exclude_lines = 7 | pragma: no cover 8 | raise NotImplementedError 9 | if TYPE_CHECKING: 10 | pass 11 | precision = 2 12 | 13 | [flake8] 14 | filename = 15 | ./minos/**/*.py, 16 | ./tests/**/*.py, 17 | ./examples/**/*.py 18 | max-line-length = 120 19 | per-file-ignores = 20 | ./**/__init__.py:F401,W391 21 | 22 | [isort] 23 | known_first_party=minos 24 | multi_line_output = 3 25 | include_trailing_comma = True 26 | force_grid_wrap = 1 27 | use_parentheses = True 28 | line_length = 120 29 | -------------------------------------------------------------------------------- /packages/core/minos-microservice-saga/tests/__init__.py: -------------------------------------------------------------------------------- 1 | """Unit test package for minos_microservice_saga.""" 2 | -------------------------------------------------------------------------------- /packages/core/minos-microservice-saga/tests/config.yml: -------------------------------------------------------------------------------- 1 | version: 2 2 | name: order 3 | 4 | databases: 5 | saga: 6 | client: minos.common.testing.MockedDatabaseClient 7 | path: "./order.lmdb" 8 | 9 | pools: 10 | database: minos.common.DatabaseClientPool 11 | -------------------------------------------------------------------------------- /packages/core/minos-microservice-saga/tests/test_saga/__init__.py: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /packages/core/minos-microservice-saga/tests/test_saga/test_definitions/__init__.py: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /packages/core/minos-microservice-saga/tests/test_saga/test_definitions/test_steps/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minos-framework/minos-python/3427fdaed489d3b9330c80ce15d77975e0135b9c/packages/core/minos-microservice-saga/tests/test_saga/test_definitions/test_steps/__init__.py -------------------------------------------------------------------------------- /packages/core/minos-microservice-saga/tests/test_saga/test_executions/__init__.py: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /packages/core/minos-microservice-saga/tests/test_saga/test_executions/test_executors/__init__.py: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /packages/core/minos-microservice-saga/tests/test_saga/test_executions/test_repositories/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minos-framework/minos-python/3427fdaed489d3b9330c80ce15d77975e0135b9c/packages/core/minos-microservice-saga/tests/test_saga/test_executions/test_repositories/__init__.py -------------------------------------------------------------------------------- /packages/core/minos-microservice-saga/tests/test_saga/test_executions/test_repositories/test_database/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minos-framework/minos-python/3427fdaed489d3b9330c80ce15d77975e0135b9c/packages/core/minos-microservice-saga/tests/test_saga/test_executions/test_repositories/test_database/__init__.py -------------------------------------------------------------------------------- /packages/core/minos-microservice-saga/tests/test_saga/test_executions/test_saga/__init__.py: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /packages/core/minos-microservice-saga/tests/test_saga/test_executions/test_steps/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minos-framework/minos-python/3427fdaed489d3b9330c80ce15d77975e0135b9c/packages/core/minos-microservice-saga/tests/test_saga/test_executions/test_steps/__init__.py -------------------------------------------------------------------------------- /packages/core/minos-microservice-saga/tests/test_saga/test_utils.py: -------------------------------------------------------------------------------- 1 | import unittest 2 | 3 | from minos.common import ( 4 | NotProvidedException, 5 | ) 6 | from minos.saga import ( 7 | get_service_name, 8 | ) 9 | from tests.utils import ( 10 | SagaTestCase, 11 | ) 12 | 13 | 14 | class TestUtils(SagaTestCase): 15 | def test_get_service_name(self): 16 | self.assertEqual("order", get_service_name()) 17 | 18 | def test_get_service_name_raises(self): 19 | with self.assertRaises(NotProvidedException): 20 | # noinspection PyTypeChecker 21 | get_service_name(config=None) 22 | 23 | 24 | if __name__ == "__main__": 25 | unittest.main() 26 | -------------------------------------------------------------------------------- /packages/plugins/minos-broker-kafka/AUTHORS.md: -------------------------------------------------------------------------------- 1 | # Credits 2 | 3 | ## Development Lead 4 | 5 | * Andrea Mucci 6 | 7 | ## Core Devs 8 | 9 | * Sergio Garcia Prado 10 | * Vladyslav Fenchak 11 | * Alberto Amigo Alonso 12 | 13 | ## Contributors 14 | 15 | None yet. Why not be the first? 16 | -------------------------------------------------------------------------------- /packages/plugins/minos-broker-kafka/Makefile: -------------------------------------------------------------------------------- 1 | .PHONY: docs dist 2 | 3 | lint: 4 | poetry run flake8 5 | 6 | test: 7 | poetry run pytest 8 | 9 | coverage: 10 | poetry run coverage run -m pytest 11 | poetry run coverage report -m 12 | poetry run coverage xml 13 | 14 | reformat: 15 | poetry run black --line-length 120 minos tests 16 | poetry run isort minos tests 17 | 18 | release: 19 | $(MAKE) dist 20 | poetry publish 21 | 22 | dist: 23 | poetry build 24 | ls -l dist 25 | 26 | install: 27 | poetry install 28 | 29 | update: 30 | poetry update 31 | 32 | check: 33 | $(MAKE) install 34 | $(MAKE) reformat 35 | $(MAKE) lint 36 | $(MAKE) test 37 | $(MAKE) dist 38 | -------------------------------------------------------------------------------- /packages/plugins/minos-broker-kafka/RUNTHETESTS.md: -------------------------------------------------------------------------------- 1 | # Run the tests 2 | 3 | In order to run the tests, please make sure you have the `Docker Engine `_ 4 | and `Docker Compose `_ installed. 5 | 6 | Move into tests/ directory 7 | 8 | `cd tests/` 9 | 10 | Run service dependencies: 11 | 12 | `docker-compose up -d` 13 | 14 | Install library dependencies: 15 | 16 | `make install` 17 | 18 | Run tests: 19 | 20 | `make test` 21 | -------------------------------------------------------------------------------- /packages/plugins/minos-broker-kafka/minos/plugins/kafka/__init__.py: -------------------------------------------------------------------------------- 1 | """The kafka plugin of the Minos Framework.""" 2 | 3 | __author__ = "Minos Framework Devs" 4 | __email__ = "hey@minos.run" 5 | __version__ = "0.7.0" 6 | 7 | from .common import ( 8 | KafkaBrokerBuilderMixin, 9 | KafkaCircuitBreakerMixin, 10 | ) 11 | from .publisher import ( 12 | KafkaBrokerPublisher, 13 | KafkaBrokerPublisherBuilder, 14 | ) 15 | from .subscriber import ( 16 | KafkaBrokerSubscriber, 17 | KafkaBrokerSubscriberBuilder, 18 | ) 19 | -------------------------------------------------------------------------------- /packages/plugins/minos-broker-kafka/poetry.toml: -------------------------------------------------------------------------------- 1 | [virtualenvs] 2 | in-project = true 3 | -------------------------------------------------------------------------------- /packages/plugins/minos-broker-kafka/setup.cfg: -------------------------------------------------------------------------------- 1 | [coverage:run] 2 | source = 3 | minos 4 | 5 | [coverage:report] 6 | exclude_lines = 7 | pragma: no cover 8 | raise NotImplementedError 9 | if TYPE_CHECKING: 10 | pass 11 | precision = 2 12 | 13 | [flake8] 14 | filename = 15 | ./minos/**/*.py, 16 | ./tests/**/*.py, 17 | ./examples/**/*.py 18 | max-line-length = 120 19 | per-file-ignores = 20 | ./**/__init__.py:F401,W391 21 | 22 | [isort] 23 | known_first_party=minos 24 | multi_line_output = 3 25 | include_trailing_comma = True 26 | force_grid_wrap = 1 27 | use_parentheses = True 28 | line_length = 120 29 | -------------------------------------------------------------------------------- /packages/plugins/minos-broker-kafka/tests/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minos-framework/minos-python/3427fdaed489d3b9330c80ce15d77975e0135b9c/packages/plugins/minos-broker-kafka/tests/__init__.py -------------------------------------------------------------------------------- /packages/plugins/minos-broker-kafka/tests/test_kafka/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minos-framework/minos-python/3427fdaed489d3b9330c80ce15d77975e0135b9c/packages/plugins/minos-broker-kafka/tests/test_kafka/__init__.py -------------------------------------------------------------------------------- /packages/plugins/minos-broker-kafka/tests/utils.py: -------------------------------------------------------------------------------- 1 | from pathlib import ( 2 | Path, 3 | ) 4 | 5 | BASE_PATH = Path(__file__).parent 6 | CONFIG_FILE_PATH = BASE_PATH / "test_config.yml" 7 | -------------------------------------------------------------------------------- /packages/plugins/minos-broker-rabbitmq/AUTHORS.md: -------------------------------------------------------------------------------- 1 | # Credits 2 | 3 | ## Development Lead 4 | 5 | * Andrea Mucci 6 | 7 | ## Core Devs 8 | 9 | * Sergio Garcia Prado 10 | * Vladyslav Fenchak 11 | * Alberto Amigo Alonso 12 | 13 | ## Contributors 14 | 15 | None yet. Why not be the first? 16 | -------------------------------------------------------------------------------- /packages/plugins/minos-broker-rabbitmq/HISTORY.md: -------------------------------------------------------------------------------- 1 | # History 2 | 3 | ## 0.6.0 (2022-03-28) 4 | 5 | * Add `RabbitMQBrokerPublisher` as the implementation of the `rabbitmq` publisher. 6 | * Add `RabbitMQBrokerSubscriber` as the implementation of the `rabbitmq` subscriber. 7 | * Add `RabbitMQBrokerPublisherBuilder`, `RabbitMQBrokerSubscriberBuilder` and `RabbitMQBrokerBuilderMixin` classes to ease the building proces. 8 | 9 | ## 0.7.0 (2022-05-11) 10 | 11 | * Minor improvements. 12 | * Unify documentation building pipeline across all `minos-python` packages. 13 | * Fix documentation building warnings. 14 | * Fix bug related with package building and additional files like `AUTHORS.md`, `HISTORY.md`, etc. -------------------------------------------------------------------------------- /packages/plugins/minos-broker-rabbitmq/Makefile: -------------------------------------------------------------------------------- 1 | .PHONY: docs 2 | 3 | lint: 4 | poetry run flake8 5 | 6 | test: 7 | poetry run pytest 8 | 9 | coverage: 10 | poetry run coverage run -m pytest 11 | poetry run coverage report -m 12 | poetry run coverage xml 13 | 14 | reformat: 15 | poetry run black --line-length 120 minos tests 16 | poetry run isort minos tests 17 | 18 | release: 19 | $(MAKE) dist 20 | poetry publish 21 | 22 | dist: 23 | poetry build 24 | ls -l dist 25 | 26 | install: 27 | poetry install 28 | 29 | update: 30 | poetry update 31 | 32 | check: 33 | $(MAKE) install 34 | $(MAKE) reformat 35 | $(MAKE) lint 36 | $(MAKE) test 37 | $(MAKE) dist 38 | -------------------------------------------------------------------------------- /packages/plugins/minos-broker-rabbitmq/RUNTHETESTS.md: -------------------------------------------------------------------------------- 1 | # Run the tests 2 | 3 | In order to run the tests, please make sure you have the `Docker Engine `_ 4 | and `Docker Compose `_ installed. 5 | 6 | Move into tests/ directory 7 | 8 | `cd tests/` 9 | 10 | Run service dependencies: 11 | 12 | `docker-compose up -d` 13 | 14 | Install library dependencies: 15 | 16 | `make install` 17 | 18 | Run tests: 19 | 20 | `make test` 21 | -------------------------------------------------------------------------------- /packages/plugins/minos-broker-rabbitmq/minos/plugins/rabbitmq/__init__.py: -------------------------------------------------------------------------------- 1 | """The rabbitmq plugin of the Minos Framework.""" 2 | 3 | __author__ = "Minos Framework Devs" 4 | __email__ = "hey@minos.run" 5 | __version__ = "0.7.0" 6 | 7 | from .common import ( 8 | RabbitMQBrokerBuilderMixin, 9 | ) 10 | from .publisher import ( 11 | RabbitMQBrokerPublisher, 12 | RabbitMQBrokerPublisherBuilder, 13 | ) 14 | from .subscriber import ( 15 | RabbitMQBrokerSubscriber, 16 | RabbitMQBrokerSubscriberBuilder, 17 | ) 18 | -------------------------------------------------------------------------------- /packages/plugins/minos-broker-rabbitmq/poetry.toml: -------------------------------------------------------------------------------- 1 | [virtualenvs] 2 | in-project = true 3 | -------------------------------------------------------------------------------- /packages/plugins/minos-broker-rabbitmq/setup.cfg: -------------------------------------------------------------------------------- 1 | [coverage:run] 2 | source = 3 | minos 4 | 5 | [coverage:report] 6 | exclude_lines = 7 | pragma: no cover 8 | raise NotImplementedError 9 | if TYPE_CHECKING: 10 | pass 11 | precision = 2 12 | 13 | [flake8] 14 | filename = 15 | ./minos/**/*.py, 16 | ./tests/**/*.py, 17 | ./examples/**/*.py 18 | max-line-length = 120 19 | per-file-ignores = 20 | ./**/__init__.py:F401,W391 21 | 22 | [isort] 23 | known_first_party=minos 24 | multi_line_output = 3 25 | include_trailing_comma = True 26 | force_grid_wrap = 1 27 | use_parentheses = True 28 | line_length = 120 29 | -------------------------------------------------------------------------------- /packages/plugins/minos-broker-rabbitmq/tests/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minos-framework/minos-python/3427fdaed489d3b9330c80ce15d77975e0135b9c/packages/plugins/minos-broker-rabbitmq/tests/__init__.py -------------------------------------------------------------------------------- /packages/plugins/minos-broker-rabbitmq/tests/docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: '2' 2 | services: 3 | rabbitmq: 4 | image: rabbitmq:3-management 5 | ports: 6 | - "5672:5672" 7 | - "15672:15672" 8 | -------------------------------------------------------------------------------- /packages/plugins/minos-broker-rabbitmq/tests/test_config.yml: -------------------------------------------------------------------------------- 1 | service: 2 | name: Order 3 | aggregate: tests.utils.Order 4 | services: 5 | - minos.networks.BrokerPort 6 | broker: 7 | host: localhost 8 | port: 5672 9 | user: guest 10 | password: guest -------------------------------------------------------------------------------- /packages/plugins/minos-broker-rabbitmq/tests/test_rabbitmq/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minos-framework/minos-python/3427fdaed489d3b9330c80ce15d77975e0135b9c/packages/plugins/minos-broker-rabbitmq/tests/test_rabbitmq/__init__.py -------------------------------------------------------------------------------- /packages/plugins/minos-broker-rabbitmq/tests/utils.py: -------------------------------------------------------------------------------- 1 | from pathlib import ( 2 | Path, 3 | ) 4 | 5 | BASE_PATH = Path(__file__).parent 6 | CONFIG_FILE_PATH = BASE_PATH / "test_config.yml" 7 | 8 | 9 | class FakeAsyncIterator: 10 | """For testing purposes.""" 11 | 12 | def __init__(self, seq): 13 | self.iter = iter(seq) 14 | 15 | def __aiter__(self): 16 | return self 17 | 18 | async def __anext__(self): 19 | try: 20 | return next(self.iter) 21 | except StopIteration: 22 | raise StopAsyncIteration 23 | -------------------------------------------------------------------------------- /packages/plugins/minos-database-aiopg/AUTHORS.md: -------------------------------------------------------------------------------- 1 | # Credits 2 | 3 | ## Development Lead 4 | 5 | * Andrea Mucci 6 | 7 | ## Core Devs 8 | 9 | * Sergio Garcia Prado 10 | * Vladyslav Fenchak 11 | * Alberto Amigo Alonso 12 | 13 | ## Contributors 14 | 15 | None yet. Why not be the first? 16 | -------------------------------------------------------------------------------- /packages/plugins/minos-database-aiopg/Makefile: -------------------------------------------------------------------------------- 1 | .PHONY: docs 2 | 3 | lint: 4 | poetry run flake8 5 | 6 | test: 7 | poetry run pytest 8 | 9 | coverage: 10 | poetry run coverage run -m pytest 11 | poetry run coverage report -m 12 | poetry run coverage xml 13 | 14 | reformat: 15 | poetry run black --line-length 120 minos tests 16 | poetry run isort minos tests 17 | 18 | release: 19 | $(MAKE) dist 20 | poetry publish 21 | 22 | dist: 23 | poetry build 24 | ls -l dist 25 | 26 | install: 27 | poetry install 28 | 29 | update: 30 | poetry update 31 | 32 | check: 33 | $(MAKE) install 34 | $(MAKE) reformat 35 | $(MAKE) lint 36 | $(MAKE) test 37 | $(MAKE) dist 38 | -------------------------------------------------------------------------------- /packages/plugins/minos-database-aiopg/RUNTHETESTS.md: -------------------------------------------------------------------------------- 1 | # Run the tests 2 | 3 | In order to run the tests, please make sure you have the `Docker Engine `_ 4 | and `Docker Compose `_ installed. 5 | 6 | Move into tests/ directory 7 | 8 | `cd tests/` 9 | 10 | Run service dependencies: 11 | 12 | `docker-compose up -d` 13 | 14 | Install library dependencies: 15 | 16 | `make install` 17 | 18 | Run tests: 19 | 20 | `make test` 21 | -------------------------------------------------------------------------------- /packages/plugins/minos-database-aiopg/minos/plugins/aiopg/factories/__init__.py: -------------------------------------------------------------------------------- 1 | from .aggregate import ( 2 | AiopgEventDatabaseOperationFactory, 3 | AiopgSnapshotDatabaseOperationFactory, 4 | AiopgSnapshotQueryDatabaseOperationBuilder, 5 | AiopgTransactionDatabaseOperationFactory, 6 | ) 7 | from .common import ( 8 | AiopgLockDatabaseOperationFactory, 9 | AiopgManagementDatabaseOperationFactory, 10 | ) 11 | from .networks import ( 12 | AiopgBrokerPublisherQueueDatabaseOperationFactory, 13 | AiopgBrokerQueueDatabaseOperationFactory, 14 | AiopgBrokerSubscriberDuplicateValidatorDatabaseOperationFactory, 15 | AiopgBrokerSubscriberQueueDatabaseOperationFactory, 16 | ) 17 | -------------------------------------------------------------------------------- /packages/plugins/minos-database-aiopg/minos/plugins/aiopg/factories/aggregate/__init__.py: -------------------------------------------------------------------------------- 1 | from .events import ( 2 | AiopgEventDatabaseOperationFactory, 3 | ) 4 | from .snapshots import ( 5 | AiopgSnapshotDatabaseOperationFactory, 6 | AiopgSnapshotQueryDatabaseOperationBuilder, 7 | ) 8 | from .transactions import ( 9 | AiopgTransactionDatabaseOperationFactory, 10 | ) 11 | -------------------------------------------------------------------------------- /packages/plugins/minos-database-aiopg/minos/plugins/aiopg/factories/aggregate/snapshots/__init__.py: -------------------------------------------------------------------------------- 1 | from .impl import ( 2 | AiopgSnapshotDatabaseOperationFactory, 3 | ) 4 | from .queries import ( 5 | AiopgSnapshotQueryDatabaseOperationBuilder, 6 | ) 7 | -------------------------------------------------------------------------------- /packages/plugins/minos-database-aiopg/minos/plugins/aiopg/factories/common/__init__.py: -------------------------------------------------------------------------------- 1 | from .locks import ( 2 | AiopgLockDatabaseOperationFactory, 3 | ) 4 | from .managemens import ( 5 | AiopgManagementDatabaseOperationFactory, 6 | ) 7 | -------------------------------------------------------------------------------- /packages/plugins/minos-database-aiopg/minos/plugins/aiopg/factories/networks/__init__.py: -------------------------------------------------------------------------------- 1 | from .collections import ( 2 | AiopgBrokerQueueDatabaseOperationFactory, 3 | ) 4 | from .publishers import ( 5 | AiopgBrokerPublisherQueueDatabaseOperationFactory, 6 | ) 7 | from .subscribers import ( 8 | AiopgBrokerSubscriberDuplicateValidatorDatabaseOperationFactory, 9 | AiopgBrokerSubscriberQueueDatabaseOperationFactory, 10 | ) 11 | -------------------------------------------------------------------------------- /packages/plugins/minos-database-aiopg/minos/plugins/aiopg/factories/networks/collections/__init__.py: -------------------------------------------------------------------------------- 1 | from .queues import ( 2 | AiopgBrokerQueueDatabaseOperationFactory, 3 | ) 4 | -------------------------------------------------------------------------------- /packages/plugins/minos-database-aiopg/minos/plugins/aiopg/factories/networks/publishers/__init__.py: -------------------------------------------------------------------------------- 1 | from .queues import ( 2 | AiopgBrokerPublisherQueueDatabaseOperationFactory, 3 | ) 4 | -------------------------------------------------------------------------------- /packages/plugins/minos-database-aiopg/minos/plugins/aiopg/factories/networks/subscribers/__init__.py: -------------------------------------------------------------------------------- 1 | from .queues import ( 2 | AiopgBrokerSubscriberQueueDatabaseOperationFactory, 3 | ) 4 | from .validators import ( 5 | AiopgBrokerSubscriberDuplicateValidatorDatabaseOperationFactory, 6 | ) 7 | -------------------------------------------------------------------------------- /packages/plugins/minos-database-aiopg/minos/plugins/aiopg/operations.py: -------------------------------------------------------------------------------- 1 | from typing import ( 2 | Any, 3 | Union, 4 | ) 5 | 6 | from psycopg2.sql import ( 7 | Composable, 8 | ) 9 | 10 | from minos.common import ( 11 | DatabaseOperation, 12 | ) 13 | 14 | 15 | class AiopgDatabaseOperation(DatabaseOperation): 16 | """Aiopg Database Operation class.""" 17 | 18 | def __init__(self, query: Union[str, Composable], parameters: dict[str, Any] = None, *args, **kwargs): 19 | super().__init__(*args, **kwargs) 20 | if parameters is None: 21 | parameters = dict() 22 | self.query = query 23 | self.parameters = parameters 24 | -------------------------------------------------------------------------------- /packages/plugins/minos-database-aiopg/poetry.toml: -------------------------------------------------------------------------------- 1 | [virtualenvs] 2 | in-project = true 3 | -------------------------------------------------------------------------------- /packages/plugins/minos-database-aiopg/setup.cfg: -------------------------------------------------------------------------------- 1 | [coverage:run] 2 | source = 3 | minos 4 | 5 | [coverage:report] 6 | exclude_lines = 7 | pragma: no cover 8 | raise NotImplementedError 9 | if TYPE_CHECKING: 10 | pass 11 | precision = 2 12 | 13 | [flake8] 14 | filename = 15 | ./minos/**/*.py, 16 | ./tests/**/*.py, 17 | ./examples/**/*.py 18 | max-line-length = 120 19 | per-file-ignores = 20 | ./**/__init__.py:F401,W391 21 | 22 | [isort] 23 | known_first_party=minos 24 | multi_line_output = 3 25 | include_trailing_comma = True 26 | force_grid_wrap = 1 27 | use_parentheses = True 28 | line_length = 120 29 | -------------------------------------------------------------------------------- /packages/plugins/minos-database-aiopg/tests/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minos-framework/minos-python/3427fdaed489d3b9330c80ce15d77975e0135b9c/packages/plugins/minos-database-aiopg/tests/__init__.py -------------------------------------------------------------------------------- /packages/plugins/minos-database-aiopg/tests/test_aiopg/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minos-framework/minos-python/3427fdaed489d3b9330c80ce15d77975e0135b9c/packages/plugins/minos-database-aiopg/tests/test_aiopg/__init__.py -------------------------------------------------------------------------------- /packages/plugins/minos-database-aiopg/tests/test_aiopg/test_factories/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minos-framework/minos-python/3427fdaed489d3b9330c80ce15d77975e0135b9c/packages/plugins/minos-database-aiopg/tests/test_aiopg/test_factories/__init__.py -------------------------------------------------------------------------------- /packages/plugins/minos-database-aiopg/tests/test_aiopg/test_factories/test_aggregate/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minos-framework/minos-python/3427fdaed489d3b9330c80ce15d77975e0135b9c/packages/plugins/minos-database-aiopg/tests/test_aiopg/test_factories/test_aggregate/__init__.py -------------------------------------------------------------------------------- /packages/plugins/minos-database-aiopg/tests/test_aiopg/test_factories/test_aggregate/test_events/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minos-framework/minos-python/3427fdaed489d3b9330c80ce15d77975e0135b9c/packages/plugins/minos-database-aiopg/tests/test_aiopg/test_factories/test_aggregate/test_events/__init__.py -------------------------------------------------------------------------------- /packages/plugins/minos-database-aiopg/tests/test_aiopg/test_factories/test_aggregate/test_snapshots/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minos-framework/minos-python/3427fdaed489d3b9330c80ce15d77975e0135b9c/packages/plugins/minos-database-aiopg/tests/test_aiopg/test_factories/test_aggregate/test_snapshots/__init__.py -------------------------------------------------------------------------------- /packages/plugins/minos-database-aiopg/tests/test_aiopg/test_factories/test_aggregate/test_transactions/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minos-framework/minos-python/3427fdaed489d3b9330c80ce15d77975e0135b9c/packages/plugins/minos-database-aiopg/tests/test_aiopg/test_factories/test_aggregate/test_transactions/__init__.py -------------------------------------------------------------------------------- /packages/plugins/minos-database-aiopg/tests/test_aiopg/test_factories/test_common/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minos-framework/minos-python/3427fdaed489d3b9330c80ce15d77975e0135b9c/packages/plugins/minos-database-aiopg/tests/test_aiopg/test_factories/test_common/__init__.py -------------------------------------------------------------------------------- /packages/plugins/minos-database-aiopg/tests/test_aiopg/test_factories/test_networks/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minos-framework/minos-python/3427fdaed489d3b9330c80ce15d77975e0135b9c/packages/plugins/minos-database-aiopg/tests/test_aiopg/test_factories/test_networks/__init__.py -------------------------------------------------------------------------------- /packages/plugins/minos-database-aiopg/tests/test_aiopg/test_factories/test_networks/test_collections/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minos-framework/minos-python/3427fdaed489d3b9330c80ce15d77975e0135b9c/packages/plugins/minos-database-aiopg/tests/test_aiopg/test_factories/test_networks/test_collections/__init__.py -------------------------------------------------------------------------------- /packages/plugins/minos-database-aiopg/tests/test_aiopg/test_factories/test_networks/test_publishers/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minos-framework/minos-python/3427fdaed489d3b9330c80ce15d77975e0135b9c/packages/plugins/minos-database-aiopg/tests/test_aiopg/test_factories/test_networks/test_publishers/__init__.py -------------------------------------------------------------------------------- /packages/plugins/minos-database-aiopg/tests/test_aiopg/test_factories/test_networks/test_subscribers/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minos-framework/minos-python/3427fdaed489d3b9330c80ce15d77975e0135b9c/packages/plugins/minos-database-aiopg/tests/test_aiopg/test_factories/test_networks/test_subscribers/__init__.py -------------------------------------------------------------------------------- /packages/plugins/minos-database-aiopg/tests/test_config.yml: -------------------------------------------------------------------------------- 1 | version: 2 2 | databases: 3 | default: 4 | client: minos.plugins.aiopg.AiopgDatabaseClient 5 | database: order_db 6 | user: minos 7 | password: min0s 8 | host: localhost 9 | port: 5432 -------------------------------------------------------------------------------- /packages/plugins/minos-database-lmdb/AUTHORS.md: -------------------------------------------------------------------------------- 1 | # Credits 2 | 3 | ## Development Lead 4 | 5 | * Andrea Mucci 6 | 7 | ## Core Devs 8 | 9 | * Sergio Garcia Prado 10 | * Vladyslav Fenchak 11 | * Alberto Amigo Alonso 12 | 13 | ## Contributors 14 | 15 | None yet. Why not be the first? 16 | -------------------------------------------------------------------------------- /packages/plugins/minos-database-lmdb/HISTORY.md: -------------------------------------------------------------------------------- 1 | # History 2 | 3 | ## 0.7.0 (2022-05-11) 4 | 5 | * Add `LmdbDatabaseClient` as the `minos.common.DatabaseClient` implementation for `lmdb`. 6 | * Add `LmdbDatabaseOperation` and `LmdbDatabaseOperationType` classes to define `minos.common.DatabaseOperation`s compatible with the `lmdb` database. 7 | * Add `LmdbSagaExecutionDatabaseOperationFactory` as the `minos.saga.SagaExecutionDatabaseOperationFactory` implementation for `lmdb`. 8 | -------------------------------------------------------------------------------- /packages/plugins/minos-database-lmdb/Makefile: -------------------------------------------------------------------------------- 1 | .PHONY: docs 2 | 3 | lint: 4 | poetry run flake8 5 | 6 | test: 7 | poetry run pytest 8 | 9 | coverage: 10 | poetry run coverage run -m pytest 11 | poetry run coverage report -m 12 | poetry run coverage xml 13 | 14 | reformat: 15 | poetry run black --line-length 120 minos tests 16 | poetry run isort minos tests 17 | 18 | release: 19 | $(MAKE) dist 20 | poetry publish 21 | 22 | dist: 23 | poetry build 24 | ls -l dist 25 | 26 | install: 27 | poetry install 28 | 29 | update: 30 | poetry update 31 | 32 | check: 33 | $(MAKE) install 34 | $(MAKE) reformat 35 | $(MAKE) lint 36 | $(MAKE) test 37 | $(MAKE) dist 38 | -------------------------------------------------------------------------------- /packages/plugins/minos-database-lmdb/RUNTHETESTS.md: -------------------------------------------------------------------------------- 1 | # Run the tests 2 | 3 | In order to run the tests, please make sure you have the `Docker Engine `_ 4 | and `Docker Compose `_ installed. 5 | 6 | Move into tests/ directory 7 | 8 | `cd tests/` 9 | 10 | Run service dependencies: 11 | 12 | `docker-compose up -d` 13 | 14 | Install library dependencies: 15 | 16 | `make install` 17 | 18 | Run tests: 19 | 20 | `make test` 21 | -------------------------------------------------------------------------------- /packages/plugins/minos-database-lmdb/minos/plugins/lmdb/__init__.py: -------------------------------------------------------------------------------- 1 | """The lmdb plugin of the Minos Framework.""" 2 | 3 | __author__ = "Minos Framework Devs" 4 | __email__ = "hey@minos.run" 5 | __version__ = "0.7.0" 6 | 7 | from .clients import ( 8 | LmdbDatabaseClient, 9 | ) 10 | from .factories import ( 11 | LmdbSagaExecutionDatabaseOperationFactory, 12 | ) 13 | from .operations import ( 14 | LmdbDatabaseOperation, 15 | LmdbDatabaseOperationType, 16 | ) 17 | -------------------------------------------------------------------------------- /packages/plugins/minos-database-lmdb/minos/plugins/lmdb/factories/__init__.py: -------------------------------------------------------------------------------- 1 | from .saga import ( 2 | LmdbSagaExecutionDatabaseOperationFactory, 3 | ) 4 | -------------------------------------------------------------------------------- /packages/plugins/minos-database-lmdb/minos/plugins/lmdb/factories/saga/__init__.py: -------------------------------------------------------------------------------- 1 | from .executions import ( 2 | LmdbSagaExecutionDatabaseOperationFactory, 3 | ) 4 | -------------------------------------------------------------------------------- /packages/plugins/minos-database-lmdb/poetry.toml: -------------------------------------------------------------------------------- 1 | [virtualenvs] 2 | in-project = true 3 | -------------------------------------------------------------------------------- /packages/plugins/minos-database-lmdb/setup.cfg: -------------------------------------------------------------------------------- 1 | [coverage:run] 2 | source = 3 | minos 4 | 5 | [coverage:report] 6 | exclude_lines = 7 | pragma: no cover 8 | raise NotImplementedError 9 | if TYPE_CHECKING: 10 | pass 11 | precision = 2 12 | 13 | [flake8] 14 | filename = 15 | ./minos/**/*.py, 16 | ./tests/**/*.py, 17 | ./examples/**/*.py 18 | max-line-length = 120 19 | per-file-ignores = 20 | ./**/__init__.py:F401,W391 21 | 22 | [isort] 23 | known_first_party=minos 24 | multi_line_output = 3 25 | include_trailing_comma = True 26 | force_grid_wrap = 1 27 | use_parentheses = True 28 | line_length = 120 29 | -------------------------------------------------------------------------------- /packages/plugins/minos-database-lmdb/tests/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minos-framework/minos-python/3427fdaed489d3b9330c80ce15d77975e0135b9c/packages/plugins/minos-database-lmdb/tests/__init__.py -------------------------------------------------------------------------------- /packages/plugins/minos-database-lmdb/tests/test_config.yml: -------------------------------------------------------------------------------- 1 | version: 2 2 | name: order 3 | databases: 4 | default: 5 | client: minos.common.testing.MockedDatabaseClient 6 | saga: 7 | client: minos.plugins.lmdb.LmdbDatabaseClient 8 | path: "./saga.lmdb" 9 | pools: 10 | database: minos.common.DatabaseClientPool -------------------------------------------------------------------------------- /packages/plugins/minos-database-lmdb/tests/test_lmdb/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minos-framework/minos-python/3427fdaed489d3b9330c80ce15d77975e0135b9c/packages/plugins/minos-database-lmdb/tests/test_lmdb/__init__.py -------------------------------------------------------------------------------- /packages/plugins/minos-database-lmdb/tests/test_lmdb/test_factories/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minos-framework/minos-python/3427fdaed489d3b9330c80ce15d77975e0135b9c/packages/plugins/minos-database-lmdb/tests/test_lmdb/test_factories/__init__.py -------------------------------------------------------------------------------- /packages/plugins/minos-database-lmdb/tests/test_lmdb/test_factories/test_saga/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minos-framework/minos-python/3427fdaed489d3b9330c80ce15d77975e0135b9c/packages/plugins/minos-database-lmdb/tests/test_lmdb/test_factories/test_saga/__init__.py -------------------------------------------------------------------------------- /packages/plugins/minos-discovery-kong/AUTHORS.md: -------------------------------------------------------------------------------- 1 | # Credits 2 | 3 | ## Development Lead 4 | 5 | * Andrea Mucci 6 | 7 | ## Core Devs 8 | 9 | * Sergio Garcia Prado 10 | * Vladyslav Fenchak 11 | * Alberto Amigo Alonso 12 | 13 | ## Contributors 14 | 15 | None yet. Why not be the first? 16 | -------------------------------------------------------------------------------- /packages/plugins/minos-discovery-kong/HISTORY.md: -------------------------------------------------------------------------------- 1 | # History 2 | 3 | ## 0.7.0 (2022-05-11) 4 | 5 | * Add `KongClient` as a class to interact with the `kong` API Gateway. 6 | * Add `KongDiscoveryClient` as the `minos.networks.DiscoveryClient` implementation for the `kong` API Gateway. 7 | * Add `middleware` function to automatically extract the user identifier from request's header variable set by the `kong` API Gateway. -------------------------------------------------------------------------------- /packages/plugins/minos-discovery-kong/Makefile: -------------------------------------------------------------------------------- 1 | .PHONY: dist 2 | 3 | lint: 4 | poetry run flake8 5 | 6 | test: 7 | poetry run pytest 8 | 9 | coverage: 10 | poetry run coverage run -m pytest 11 | poetry run coverage report -m 12 | poetry run coverage xml 13 | 14 | reformat: 15 | poetry run black --line-length 120 minos tests 16 | poetry run isort minos tests 17 | 18 | release: 19 | $(MAKE) dist 20 | poetry publish 21 | 22 | dist: 23 | poetry build 24 | ls -l dist 25 | 26 | install: 27 | poetry install 28 | 29 | update: 30 | poetry update 31 | 32 | check: 33 | $(MAKE) install 34 | $(MAKE) reformat 35 | $(MAKE) lint 36 | $(MAKE) test 37 | $(MAKE) dist 38 | -------------------------------------------------------------------------------- /packages/plugins/minos-discovery-kong/RUNTHETESTS.md: -------------------------------------------------------------------------------- 1 | # Run the tests 2 | 3 | In order to run the tests, please make sure you have the `Docker Engine `_ 4 | and `Docker Compose `_ installed. 5 | 6 | Move into tests/ directory 7 | 8 | `cd tests/` 9 | 10 | Run service dependencies: 11 | 12 | `docker-compose up -d` 13 | 14 | Install library dependencies: 15 | 16 | `make install` 17 | 18 | Run tests: 19 | 20 | `make test` 21 | -------------------------------------------------------------------------------- /packages/plugins/minos-discovery-kong/minos/plugins/kong/__init__.py: -------------------------------------------------------------------------------- 1 | """The kong plugin of the Minos Framework.""" 2 | 3 | __author__ = "Minos Framework Devs" 4 | __email__ = "hey@minos.run" 5 | __version__ = "0.7.0" 6 | 7 | from .client import ( 8 | KongClient, 9 | ) 10 | from .discovery import ( 11 | KongDiscoveryClient, 12 | ) 13 | from .middleware import ( 14 | middleware, 15 | ) 16 | -------------------------------------------------------------------------------- /packages/plugins/minos-discovery-kong/poetry.toml: -------------------------------------------------------------------------------- 1 | [virtualenvs] 2 | in-project = true 3 | -------------------------------------------------------------------------------- /packages/plugins/minos-discovery-kong/setup.cfg: -------------------------------------------------------------------------------- 1 | [coverage:run] 2 | source = 3 | minos 4 | 5 | [coverage:report] 6 | exclude_lines = 7 | pragma: no cover 8 | raise NotImplementedError 9 | if TYPE_CHECKING: 10 | pass 11 | precision = 2 12 | 13 | [flake8] 14 | filename = 15 | ./minos/**/*.py, 16 | ./tests/**/*.py, 17 | ./examples/**/*.py 18 | max-line-length = 120 19 | per-file-ignores = 20 | ./**/__init__.py:F401,W391 21 | 22 | [isort] 23 | known_first_party=minos 24 | multi_line_output = 3 25 | include_trailing_comma = True 26 | force_grid_wrap = 1 27 | use_parentheses = True 28 | line_length = 120 29 | -------------------------------------------------------------------------------- /packages/plugins/minos-discovery-kong/tests/__init__.py: -------------------------------------------------------------------------------- 1 | """Unit test package for minos_microservice_networks.""" 2 | -------------------------------------------------------------------------------- /packages/plugins/minos-discovery-kong/tests/test_config.yml: -------------------------------------------------------------------------------- 1 | discovery: 2 | connector: minos.networks.DiscoveryConnector 3 | client: minos.networks.InMemoryDiscoveryClient 4 | auth-type: jwt 5 | token-exp: 60 6 | host: localhost 7 | port: 8001 8 | -------------------------------------------------------------------------------- /packages/plugins/minos-discovery-kong/tests/test_config_no_auth.yml: -------------------------------------------------------------------------------- 1 | discovery: 2 | connector: minos.networks.DiscoveryConnector 3 | client: minos.networks.InMemoryDiscoveryClient 4 | host: localhost 5 | port: 8001 6 | -------------------------------------------------------------------------------- /packages/plugins/minos-discovery-kong/tests/test_kong/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minos-framework/minos-python/3427fdaed489d3b9330c80ce15d77975e0135b9c/packages/plugins/minos-discovery-kong/tests/test_kong/__init__.py -------------------------------------------------------------------------------- /packages/plugins/minos-discovery-minos/AUTHORS.md: -------------------------------------------------------------------------------- 1 | # Credits 2 | 3 | ## Development Lead 4 | 5 | * Andrea Mucci 6 | 7 | ## Core Devs 8 | 9 | * Sergio Garcia Prado 10 | * Vladyslav Fenchak 11 | * Alberto Amigo Alonso 12 | 13 | ## Contributors 14 | 15 | None yet. Why not be the first? 16 | -------------------------------------------------------------------------------- /packages/plugins/minos-discovery-minos/Makefile: -------------------------------------------------------------------------------- 1 | .PHONY: docs dist 2 | 3 | lint: 4 | poetry run flake8 5 | 6 | test: 7 | poetry run pytest 8 | 9 | coverage: 10 | poetry run coverage run -m pytest 11 | poetry run coverage report -m 12 | poetry run coverage xml 13 | 14 | reformat: 15 | poetry run black --line-length 120 minos tests 16 | poetry run isort minos tests 17 | 18 | release: 19 | $(MAKE) dist 20 | poetry publish 21 | 22 | dist: 23 | poetry build 24 | ls -l dist 25 | 26 | install: 27 | poetry install 28 | 29 | update: 30 | poetry update 31 | 32 | check: 33 | $(MAKE) install 34 | $(MAKE) reformat 35 | $(MAKE) lint 36 | $(MAKE) test 37 | $(MAKE) dist 38 | -------------------------------------------------------------------------------- /packages/plugins/minos-discovery-minos/RUNTHETESTS.md: -------------------------------------------------------------------------------- 1 | # Run the tests 2 | 3 | In order to run the tests, please make sure you have the `Docker Engine `_ 4 | and `Docker Compose `_ installed. 5 | 6 | Move into tests/ directory 7 | 8 | `cd tests/` 9 | 10 | Run service dependencies: 11 | 12 | `docker-compose up -d` 13 | 14 | Install library dependencies: 15 | 16 | `make install` 17 | 18 | Run tests: 19 | 20 | `make test` 21 | -------------------------------------------------------------------------------- /packages/plugins/minos-discovery-minos/minos/plugins/minos_discovery/__init__.py: -------------------------------------------------------------------------------- 1 | """The minos-discovery plugin of the Minos Framework.""" 2 | 3 | __author__ = "Minos Framework Devs" 4 | __email__ = "hey@minos.run" 5 | __version__ = "0.7.0" 6 | 7 | from .client import ( 8 | MinosDiscoveryClient, 9 | ) 10 | -------------------------------------------------------------------------------- /packages/plugins/minos-discovery-minos/poetry.toml: -------------------------------------------------------------------------------- 1 | [virtualenvs] 2 | in-project = true 3 | -------------------------------------------------------------------------------- /packages/plugins/minos-discovery-minos/setup.cfg: -------------------------------------------------------------------------------- 1 | [coverage:run] 2 | source = 3 | minos 4 | 5 | [coverage:report] 6 | exclude_lines = 7 | pragma: no cover 8 | raise NotImplementedError 9 | if TYPE_CHECKING: 10 | pass 11 | precision = 2 12 | 13 | [flake8] 14 | filename = 15 | ./minos/**/*.py, 16 | ./tests/**/*.py, 17 | ./examples/**/*.py 18 | max-line-length = 120 19 | per-file-ignores = 20 | ./**/__init__.py:F401,W391 21 | 22 | [isort] 23 | known_first_party=minos 24 | multi_line_output = 3 25 | include_trailing_comma = True 26 | force_grid_wrap = 1 27 | use_parentheses = True 28 | line_length = 120 29 | -------------------------------------------------------------------------------- /packages/plugins/minos-discovery-minos/tests/test_minos_discovery/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minos-framework/minos-python/3427fdaed489d3b9330c80ce15d77975e0135b9c/packages/plugins/minos-discovery-minos/tests/test_minos_discovery/__init__.py -------------------------------------------------------------------------------- /packages/plugins/minos-http-aiohttp/AUTHORS.md: -------------------------------------------------------------------------------- 1 | # Credits 2 | 3 | ## Development Lead 4 | 5 | * Andrea Mucci 6 | 7 | ## Core Devs 8 | 9 | * Sergio Garcia Prado 10 | * Vladyslav Fenchak 11 | * Alberto Amigo Alonso 12 | 13 | ## Contributors 14 | 15 | None yet. Why not be the first? 16 | -------------------------------------------------------------------------------- /packages/plugins/minos-http-aiohttp/HISTORY.md: -------------------------------------------------------------------------------- 1 | # History 2 | 3 | ## 0.6.0 (2022-03-28) 4 | 5 | * Add `AioHttpConnector` as the implementation of the `aiohttp` server. 6 | * Add `AioHttpRequest`, `AioHttpResponse` and `AioHttpResponseException` classes as the request/response wrappers for `aiohttp`. 7 | 8 | ## 0.7.0 (2022-05-11) 9 | 10 | * Now `AioHttpRequest`'s `headers` attribute is mutable. 11 | * Unify documentation building pipeline across all `minos-python` packages. 12 | * Fix documentation building warnings. 13 | * Fix bug related with package building and additional files like `AUTHORS.md`, `HISTORY.md`, etc. -------------------------------------------------------------------------------- /packages/plugins/minos-http-aiohttp/Makefile: -------------------------------------------------------------------------------- 1 | .PHONY: docs 2 | 3 | lint: 4 | poetry run flake8 5 | 6 | test: 7 | poetry run pytest 8 | 9 | coverage: 10 | poetry run coverage run -m pytest 11 | poetry run coverage report -m 12 | poetry run coverage xml 13 | 14 | reformat: 15 | poetry run black --line-length 120 minos tests 16 | poetry run isort minos tests 17 | 18 | release: 19 | $(MAKE) dist 20 | poetry publish 21 | 22 | dist: 23 | poetry build 24 | ls -l dist 25 | 26 | install: 27 | poetry install 28 | 29 | update: 30 | poetry update 31 | 32 | check: 33 | $(MAKE) install 34 | $(MAKE) reformat 35 | $(MAKE) lint 36 | $(MAKE) test 37 | $(MAKE) dist 38 | -------------------------------------------------------------------------------- /packages/plugins/minos-http-aiohttp/RUNTHETESTS.md: -------------------------------------------------------------------------------- 1 | # Run the tests 2 | 3 | In order to run the tests, please make sure you have the `Docker Engine `_ 4 | and `Docker Compose `_ installed. 5 | 6 | Move into tests/ directory 7 | 8 | `cd tests/` 9 | 10 | Run service dependencies: 11 | 12 | `docker-compose up -d` 13 | 14 | Install library dependencies: 15 | 16 | `make install` 17 | 18 | Run tests: 19 | 20 | `make test` 21 | -------------------------------------------------------------------------------- /packages/plugins/minos-http-aiohttp/minos/plugins/aiohttp/__init__.py: -------------------------------------------------------------------------------- 1 | """The aiohttp plugin of the Minos Framework.""" 2 | 3 | __author__ = "Minos Framework Devs" 4 | __email__ = "hey@minos.run" 5 | __version__ = "0.7.0" 6 | 7 | from .connectors import ( 8 | AioHttpConnector, 9 | ) 10 | from .requests import ( 11 | AioHttpRequest, 12 | AioHttpResponse, 13 | AioHttpResponseException, 14 | ) 15 | -------------------------------------------------------------------------------- /packages/plugins/minos-http-aiohttp/poetry.toml: -------------------------------------------------------------------------------- 1 | [virtualenvs] 2 | in-project = true 3 | -------------------------------------------------------------------------------- /packages/plugins/minos-http-aiohttp/setup.cfg: -------------------------------------------------------------------------------- 1 | [coverage:run] 2 | source = 3 | minos 4 | 5 | [coverage:report] 6 | exclude_lines = 7 | pragma: no cover 8 | raise NotImplementedError 9 | if TYPE_CHECKING: 10 | pass 11 | precision = 2 12 | 13 | [flake8] 14 | filename = 15 | ./minos/**/*.py, 16 | ./tests/**/*.py, 17 | ./examples/**/*.py 18 | max-line-length = 120 19 | per-file-ignores = 20 | ./**/__init__.py:F401,W391 21 | 22 | [isort] 23 | known_first_party=minos 24 | multi_line_output = 3 25 | include_trailing_comma = True 26 | force_grid_wrap = 1 27 | use_parentheses = True 28 | line_length = 120 29 | -------------------------------------------------------------------------------- /packages/plugins/minos-http-aiohttp/tests/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minos-framework/minos-python/3427fdaed489d3b9330c80ce15d77975e0135b9c/packages/plugins/minos-http-aiohttp/tests/__init__.py -------------------------------------------------------------------------------- /packages/plugins/minos-http-aiohttp/tests/test_aiohttp/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minos-framework/minos-python/3427fdaed489d3b9330c80ce15d77975e0135b9c/packages/plugins/minos-http-aiohttp/tests/test_aiohttp/__init__.py -------------------------------------------------------------------------------- /packages/plugins/minos-router-graphql/AUTHORS.md: -------------------------------------------------------------------------------- 1 | # Credits 2 | 3 | ## Development Lead 4 | 5 | * Andrea Mucci 6 | 7 | ## Core Devs 8 | 9 | * Sergio Garcia Prado 10 | * Vladyslav Fenchak 11 | * Alberto Amigo Alonso 12 | 13 | ## Contributors 14 | 15 | None yet. Why not be the first? 16 | -------------------------------------------------------------------------------- /packages/plugins/minos-router-graphql/Makefile: -------------------------------------------------------------------------------- 1 | .PHONY: docs 2 | 3 | lint: 4 | poetry run flake8 5 | 6 | test: 7 | poetry run pytest 8 | 9 | coverage: 10 | poetry run coverage run -m pytest 11 | poetry run coverage report -m 12 | poetry run coverage xml 13 | 14 | reformat: 15 | poetry run black --line-length 120 minos tests 16 | poetry run isort minos tests 17 | 18 | release: 19 | $(MAKE) dist 20 | poetry publish 21 | 22 | dist: 23 | poetry build 24 | ls -l dist 25 | 26 | install: 27 | poetry install 28 | 29 | update: 30 | poetry update 31 | 32 | check: 33 | $(MAKE) install 34 | $(MAKE) reformat 35 | $(MAKE) lint 36 | $(MAKE) test 37 | $(MAKE) dist 38 | -------------------------------------------------------------------------------- /packages/plugins/minos-router-graphql/RUNTHETESTS.md: -------------------------------------------------------------------------------- 1 | # Run the tests 2 | 3 | In order to run the tests, please make sure you have the `Docker Engine `_ 4 | and `Docker Compose `_ installed. 5 | 6 | Move into tests/ directory 7 | 8 | `cd tests/` 9 | 10 | Run service dependencies: 11 | 12 | `docker-compose up -d` 13 | 14 | Install library dependencies: 15 | 16 | `make install` 17 | 18 | Run tests: 19 | 20 | `make test` 21 | -------------------------------------------------------------------------------- /packages/plugins/minos-router-graphql/minos/plugins/graphql/__init__.py: -------------------------------------------------------------------------------- 1 | """The graphql plugin of the Minos Framework.""" 2 | 3 | __author__ = "Minos Framework Devs" 4 | __email__ = "hey@minos.run" 5 | __version__ = "0.7.0" 6 | 7 | from .builders import ( 8 | GraphQLSchemaBuilder, 9 | ) 10 | from .decorators import ( 11 | GraphQlCommandEnrouteDecorator, 12 | GraphQlEnroute, 13 | GraphQlEnrouteDecorator, 14 | GraphQlQueryEnrouteDecorator, 15 | ) 16 | from .handlers import ( 17 | GraphQlHandler, 18 | ) 19 | from .routers import ( 20 | GraphQlHttpRouter, 21 | ) 22 | 23 | 24 | def _register_enroute(): 25 | GraphQlEnroute.register() 26 | -------------------------------------------------------------------------------- /packages/plugins/minos-router-graphql/minos/plugins/graphql/builders/__init__.py: -------------------------------------------------------------------------------- 1 | from .schema import ( 2 | GraphQLSchemaBuilder, 3 | ) 4 | -------------------------------------------------------------------------------- /packages/plugins/minos-router-graphql/poetry.toml: -------------------------------------------------------------------------------- 1 | [virtualenvs] 2 | in-project = true 3 | -------------------------------------------------------------------------------- /packages/plugins/minos-router-graphql/setup.cfg: -------------------------------------------------------------------------------- 1 | [coverage:run] 2 | source = 3 | minos 4 | 5 | [coverage:report] 6 | exclude_lines = 7 | pragma: no cover 8 | raise NotImplementedError 9 | if TYPE_CHECKING: 10 | pass 11 | precision = 2 12 | 13 | [flake8] 14 | filename = 15 | ./minos/**/*.py, 16 | ./tests/**/*.py, 17 | ./examples/**/*.py 18 | max-line-length = 120 19 | per-file-ignores = 20 | ./**/__init__.py:F401,W391 21 | 22 | [isort] 23 | known_first_party=minos 24 | multi_line_output = 3 25 | include_trailing_comma = True 26 | force_grid_wrap = 1 27 | use_parentheses = True 28 | line_length = 120 29 | -------------------------------------------------------------------------------- /packages/plugins/minos-router-graphql/tests/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minos-framework/minos-python/3427fdaed489d3b9330c80ce15d77975e0135b9c/packages/plugins/minos-router-graphql/tests/__init__.py -------------------------------------------------------------------------------- /packages/plugins/minos-router-graphql/tests/test_graphql/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minos-framework/minos-python/3427fdaed489d3b9330c80ce15d77975e0135b9c/packages/plugins/minos-router-graphql/tests/test_graphql/__init__.py -------------------------------------------------------------------------------- /packages/plugins/minos-router-graphql/tests/test_graphql/test_builders/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minos-framework/minos-python/3427fdaed489d3b9330c80ce15d77975e0135b9c/packages/plugins/minos-router-graphql/tests/test_graphql/test_builders/__init__.py -------------------------------------------------------------------------------- /poetry.toml: -------------------------------------------------------------------------------- 1 | [virtualenvs] 2 | in-project = true 3 | -------------------------------------------------------------------------------- /tutorials/eboutique/.minos-answers.yml: -------------------------------------------------------------------------------- 1 | apigateway: minos 2 | apigateway_deploy: self-hosted 3 | broker: kafka 4 | broker_deploy: self-hosted 5 | database: postgres 6 | discovery: minos 7 | discovery_database: redis 8 | discovery_deploy: self-hosted 9 | postgres_deploy: self-hosted 10 | project_deploy: docker-compose 11 | project_description: This is an Online Boutique with Minos Microservices 12 | project_name: eboutique 13 | project_version: 0.1.0 14 | redis_deploy: self-hosted 15 | template_name: project-init 16 | template_registry: https://github.com/minos-framework/minos-templates/releases/download/v0.1.1 17 | template_version: v0.1.1 18 | -------------------------------------------------------------------------------- /tutorials/eboutique/.minos-project.yaml: -------------------------------------------------------------------------------- 1 | services: 2 | database: postgres 3 | broker: kafka 4 | apigateway: minos 5 | discovery: minos 6 | -------------------------------------------------------------------------------- /tutorials/eboutique/README.md: -------------------------------------------------------------------------------- 1 | # eboutique Project 2 | 3 | ## Description 4 | This is an Online Boutique with Minos Microservices -------------------------------------------------------------------------------- /tutorials/eboutique/external/README.md: -------------------------------------------------------------------------------- 1 | # eboutique - External -------------------------------------------------------------------------------- /tutorials/eboutique/external/apigateway/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM python 2 | 3 | RUN pip install minos-apigateway==0.1.0 4 | 5 | COPY config.yml ./config.yml 6 | CMD ["api_gateway", "start", "config.yml"] 7 | -------------------------------------------------------------------------------- /tutorials/eboutique/external/apigateway/config.yml: -------------------------------------------------------------------------------- 1 | rest: 2 | host: 0.0.0.0 3 | port: 5566 4 | cors: 5 | enabled: true 6 | auth: 7 | host: localhost 8 | port: 8092 9 | method: POST 10 | path: /validate-token 11 | discovery: 12 | host: localhost 13 | port: 5567 14 | -------------------------------------------------------------------------------- /tutorials/eboutique/external/discovery/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM python 2 | 3 | RUN apt install git 4 | RUN pip install minos-discovery==0.0.8 5 | 6 | COPY config.yml ./config.yml 7 | CMD ["discovery", "start", "config.yml"] 8 | -------------------------------------------------------------------------------- /tutorials/eboutique/external/discovery/config.yml: -------------------------------------------------------------------------------- 1 | discovery: 2 | host: 0.0.0.0 3 | port: 5566 4 | path: "" 5 | endpoints: [] 6 | db: 7 | host: localhost 8 | port: 6379 9 | password: 10 | -------------------------------------------------------------------------------- /tutorials/eboutique/external/postgres/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM postgres:14.2 2 | COPY init/10-create-database.sql /docker-entrypoint-initdb.d/10-create-database.sql 3 | -------------------------------------------------------------------------------- /tutorials/eboutique/front/README.md: -------------------------------------------------------------------------------- 1 | # eboutique - Front -------------------------------------------------------------------------------- /tutorials/eboutique/microservices/README.md: -------------------------------------------------------------------------------- 1 | # eboutique - Microservices -------------------------------------------------------------------------------- /tutorials/eboutique/microservices/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minos-framework/minos-python/3427fdaed489d3b9330c80ce15d77975e0135b9c/tutorials/eboutique/microservices/__init__.py -------------------------------------------------------------------------------- /tutorials/eboutique/microservices/cart/.dockerignore: -------------------------------------------------------------------------------- 1 | .venv 2 | *.lmdb 3 | dist/ 4 | -------------------------------------------------------------------------------- /tutorials/eboutique/microservices/cart/.minos-microservice.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minos-framework/minos-python/3427fdaed489d3b9330c80ce15d77975e0135b9c/tutorials/eboutique/microservices/cart/.minos-microservice.yaml -------------------------------------------------------------------------------- /tutorials/eboutique/microservices/cart/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM ghcr.io/clariteia/minos-microservice:0.1.8 as development 2 | 3 | COPY ./pyproject.toml ./poetry.lock ./ 4 | RUN poetry install --no-root 5 | COPY . . 6 | CMD ["poetry", "run", "microservice", "start"] 7 | 8 | FROM development as build 9 | RUN poetry export --without-hashes > req.txt && pip wheel -r req.txt --wheel-dir ./dist 10 | RUN poetry build --format wheel 11 | 12 | FROM python:3.9-slim as production 13 | COPY --from=build /microservice/dist/ ./dist 14 | RUN pip install --no-deps ./dist/* 15 | COPY config.yml ./config.yml 16 | ENTRYPOINT ["microservice"] 17 | CMD ["start"] 18 | -------------------------------------------------------------------------------- /tutorials/eboutique/microservices/cart/README.md: -------------------------------------------------------------------------------- 1 | # cart Microservice 2 | 3 | ## Description 4 | -------------------------------------------------------------------------------- /tutorials/eboutique/microservices/cart/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minos-framework/minos-python/3427fdaed489d3b9330c80ce15d77975e0135b9c/tutorials/eboutique/microservices/cart/__init__.py -------------------------------------------------------------------------------- /tutorials/eboutique/microservices/cart/poetry.toml: -------------------------------------------------------------------------------- 1 | [virtualenvs] 2 | in-project = true -------------------------------------------------------------------------------- /tutorials/eboutique/microservices/cart/setup.cfg: -------------------------------------------------------------------------------- 1 | [coverage:run] 2 | source = src 3 | 4 | [coverage:report] 5 | exclude_lines = 6 | pragma: no cover 7 | raise NotImplementedError 8 | if TYPE_CHECKING: 9 | pass 10 | precision = 2 11 | 12 | [flake8] 13 | filename = 14 | ./src/**/*.py, 15 | ./tests/**/*.py, 16 | max-line-length = 120 17 | per-file-ignores = 18 | ./**/__init__.py:F401,W391 19 | 20 | [isort] 21 | known_first_party = src,tests 22 | multi_line_output = 3 23 | include_trailing_comma = True 24 | force_grid_wrap = 1 25 | use_parentheses = True 26 | line_length = 120 27 | -------------------------------------------------------------------------------- /tutorials/eboutique/microservices/cart/src/__init__.py: -------------------------------------------------------------------------------- 1 | __author__ = "" 2 | __email__ = "" 3 | __version__ = "0.1.0" 4 | 5 | from .aggregates import ( 6 | Cart, 7 | CartItem, 8 | ) 9 | from .cli import ( 10 | main, 11 | ) 12 | from .commands import ( 13 | CartCommandService, 14 | ) 15 | from .queries import ( 16 | CartQueryRepository, 17 | CartQueryService, 18 | ) 19 | -------------------------------------------------------------------------------- /tutorials/eboutique/microservices/cart/src/__main__.py: -------------------------------------------------------------------------------- 1 | from .cli import ( 2 | main, 3 | ) 4 | 5 | if __name__ == "__main__": 6 | main() 7 | -------------------------------------------------------------------------------- /tutorials/eboutique/microservices/cart/src/commands/__init__.py: -------------------------------------------------------------------------------- 1 | from .services import ( 2 | CartCommandService, 3 | ) 4 | -------------------------------------------------------------------------------- /tutorials/eboutique/microservices/cart/src/commands/saga/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minos-framework/minos-python/3427fdaed489d3b9330c80ce15d77975e0135b9c/tutorials/eboutique/microservices/cart/src/commands/saga/__init__.py -------------------------------------------------------------------------------- /tutorials/eboutique/microservices/cart/src/queries/__init__.py: -------------------------------------------------------------------------------- 1 | from .repository import ( 2 | CartQueryRepository, 3 | ) 4 | from .services import ( 5 | CartQueryService, 6 | ) 7 | -------------------------------------------------------------------------------- /tutorials/eboutique/microservices/cart/tests/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minos-framework/minos-python/3427fdaed489d3b9330c80ce15d77975e0135b9c/tutorials/eboutique/microservices/cart/tests/__init__.py -------------------------------------------------------------------------------- /tutorials/eboutique/microservices/checkout/.build_docker_compose.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minos-framework/minos-python/3427fdaed489d3b9330c80ce15d77975e0135b9c/tutorials/eboutique/microservices/checkout/.build_docker_compose.txt -------------------------------------------------------------------------------- /tutorials/eboutique/microservices/checkout/.dockerignore: -------------------------------------------------------------------------------- 1 | .venv 2 | *.lmdb 3 | dist/ 4 | -------------------------------------------------------------------------------- /tutorials/eboutique/microservices/checkout/.minos-microservice.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minos-framework/minos-python/3427fdaed489d3b9330c80ce15d77975e0135b9c/tutorials/eboutique/microservices/checkout/.minos-microservice.yaml -------------------------------------------------------------------------------- /tutorials/eboutique/microservices/checkout/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM ghcr.io/clariteia/minos-microservice:0.1.8 as development 2 | 3 | COPY ./pyproject.toml ./ 4 | RUN poetry install --no-root 5 | COPY . . 6 | CMD ["poetry", "run", "microservice", "start"] 7 | 8 | FROM development as build 9 | RUN poetry export --without-hashes > req.txt && pip wheel -r req.txt --wheel-dir ./dist 10 | RUN poetry build --format wheel 11 | 12 | FROM python:3.9-slim as production 13 | COPY --from=build /microservice/dist/ ./dist 14 | RUN pip install --no-deps ./dist/* 15 | COPY config.yml ./config.yml 16 | ENTRYPOINT ["microservice"] 17 | CMD ["start"] 18 | -------------------------------------------------------------------------------- /tutorials/eboutique/microservices/checkout/README.md: -------------------------------------------------------------------------------- 1 | # checkout Microservice 2 | 3 | ## Description 4 | -------------------------------------------------------------------------------- /tutorials/eboutique/microservices/checkout/playbooks/create-database.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Create Database 3 | import_playbook: ../../../external/postgres/playbooks/create-database.yaml 4 | vars: 5 | db_name: checkout_db -------------------------------------------------------------------------------- /tutorials/eboutique/microservices/checkout/playbooks/deploy.yaml: -------------------------------------------------------------------------------- 1 | - name: Create Database 2 | import_playbook: create-database.yaml 3 | - name: Create Query Database 4 | import_playbook: create-database.yaml 5 | - name: Lock Dependencies 6 | import_playbook: lock.yaml 7 | -------------------------------------------------------------------------------- /tutorials/eboutique/microservices/checkout/playbooks/install.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | - hosts: localhost 3 | connection: local 4 | tasks: 5 | - name: Install Package 6 | shell: poetry install 7 | args: 8 | chdir: ../ 9 | register: results 10 | 11 | - debug: var=results.stdout_lines 12 | 13 | - debug: var=results.stderr_lines 14 | -------------------------------------------------------------------------------- /tutorials/eboutique/microservices/checkout/playbooks/lint.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | - hosts: localhost 3 | connection: local 4 | tasks: 5 | - name: Check Syntax 6 | shell: poetry run flake8 7 | args: 8 | chdir: ../ 9 | register: results 10 | 11 | - debug: var=results.stdout_lines 12 | 13 | - debug: var=results.stderr_lines 14 | -------------------------------------------------------------------------------- /tutorials/eboutique/microservices/checkout/playbooks/lock.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | - hosts: localhost 3 | connection: local 4 | tasks: 5 | - name: Lock Dependencies 6 | shell: poetry lock 7 | args: 8 | chdir: ../ 9 | register: results 10 | 11 | - debug: var=results.stdout_lines 12 | 13 | - debug: var=results.stderr_lines 14 | -------------------------------------------------------------------------------- /tutorials/eboutique/microservices/checkout/playbooks/reformat.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | - hosts: localhost 3 | connection: local 4 | tasks: 5 | - name: Format Code 6 | shell: poetry run black --line-length 120 src tests 7 | args: 8 | chdir: ../ 9 | register: results 10 | 11 | - debug: var=results.stdout_lines 12 | 13 | - debug: var=results.stderr_lines 14 | 15 | - name: Sort Imports 16 | shell: poetry run isort src tests 17 | args: 18 | chdir: ../ 19 | register: results 20 | 21 | - debug: var=results.stdout_lines 22 | 23 | - debug: var=results.stderr_lines 24 | -------------------------------------------------------------------------------- /tutorials/eboutique/microservices/checkout/playbooks/test.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | - hosts: localhost 3 | connection: local 4 | tasks: 5 | - name: Test package 6 | shell: poetry install 7 | args: 8 | chdir: ../ 9 | register: results 10 | 11 | - debug: var=results.stdout_lines 12 | 13 | - debug: var=results.stderr_lines 14 | -------------------------------------------------------------------------------- /tutorials/eboutique/microservices/checkout/playbooks/update.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | - hosts: localhost 3 | connection: local 4 | tasks: 5 | - name: Update Package Dependencies 6 | shell: poetry run pytest 7 | args: 8 | chdir: ../ 9 | register: results 10 | 11 | - debug: var=results.stdout_lines 12 | 13 | - debug: var=results.stderr_lines 14 | -------------------------------------------------------------------------------- /tutorials/eboutique/microservices/checkout/poetry.toml: -------------------------------------------------------------------------------- 1 | [virtualenvs] 2 | in-project = true -------------------------------------------------------------------------------- /tutorials/eboutique/microservices/checkout/setup.cfg: -------------------------------------------------------------------------------- 1 | [coverage:run] 2 | source = src 3 | 4 | [coverage:report] 5 | exclude_lines = 6 | pragma: no cover 7 | raise NotImplementedError 8 | if TYPE_CHECKING: 9 | pass 10 | precision = 2 11 | 12 | [flake8] 13 | filename = 14 | ./src/**/*.py, 15 | ./tests/**/*.py, 16 | max-line-length = 120 17 | per-file-ignores = 18 | ./**/__init__.py:F401,W391 19 | 20 | [isort] 21 | known_first_party = src,tests 22 | multi_line_output = 3 23 | include_trailing_comma = True 24 | force_grid_wrap = 1 25 | use_parentheses = True 26 | line_length = 120 27 | -------------------------------------------------------------------------------- /tutorials/eboutique/microservices/checkout/src/__init__.py: -------------------------------------------------------------------------------- 1 | __author__ = "" 2 | __email__ = "" 3 | __version__ = "0.1.0" 4 | 5 | from .aggregates import ( 6 | Checkout, 7 | ) 8 | from .cli import ( 9 | main, 10 | ) 11 | from .commands import ( 12 | CheckoutCommandService, 13 | ) 14 | from .queries import ( 15 | CheckoutQueryService, 16 | CheckoutQueryServiceRepository, 17 | ) 18 | -------------------------------------------------------------------------------- /tutorials/eboutique/microservices/checkout/src/__main__.py: -------------------------------------------------------------------------------- 1 | from .cli import ( 2 | main, 3 | ) 4 | 5 | if __name__ == "__main__": 6 | main() 7 | -------------------------------------------------------------------------------- /tutorials/eboutique/microservices/checkout/src/aggregates.py: -------------------------------------------------------------------------------- 1 | from uuid import ( 2 | UUID, 3 | ) 4 | 5 | from minos.aggregate import ( 6 | Aggregate, 7 | RootEntity, 8 | ) 9 | 10 | 11 | class Checkout(RootEntity): 12 | """Checkout RootEntity class.""" 13 | 14 | 15 | class CheckoutAggregate(Aggregate[Checkout]): 16 | """CheckoutAggregate class.""" 17 | 18 | @staticmethod 19 | async def create() -> UUID: 20 | """Create a new instance.""" 21 | root = await Checkout.create() 22 | return root.uuid 23 | -------------------------------------------------------------------------------- /tutorials/eboutique/microservices/checkout/src/commands/__init__.py: -------------------------------------------------------------------------------- 1 | from .services import ( 2 | CheckoutCommandService, 3 | ) 4 | -------------------------------------------------------------------------------- /tutorials/eboutique/microservices/checkout/src/queries/__init__.py: -------------------------------------------------------------------------------- 1 | from .repository import ( 2 | CheckoutQueryServiceRepository, 3 | ) 4 | from .services import ( 5 | CheckoutQueryService, 6 | ) 7 | -------------------------------------------------------------------------------- /tutorials/eboutique/microservices/checkout/src/queries/models.py: -------------------------------------------------------------------------------- 1 | from sqlalchemy.orm import ( 2 | declarative_base, 3 | ) 4 | 5 | Base = declarative_base() 6 | -------------------------------------------------------------------------------- /tutorials/eboutique/microservices/checkout/tests/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minos-framework/minos-python/3427fdaed489d3b9330c80ce15d77975e0135b9c/tutorials/eboutique/microservices/checkout/tests/__init__.py -------------------------------------------------------------------------------- /tutorials/eboutique/microservices/checkout/tests/test_commands/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minos-framework/minos-python/3427fdaed489d3b9330c80ce15d77975e0135b9c/tutorials/eboutique/microservices/checkout/tests/test_commands/__init__.py -------------------------------------------------------------------------------- /tutorials/eboutique/microservices/checkout/tests/test_queries/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minos-framework/minos-python/3427fdaed489d3b9330c80ce15d77975e0135b9c/tutorials/eboutique/microservices/checkout/tests/test_queries/__init__.py -------------------------------------------------------------------------------- /tutorials/eboutique/microservices/currency/.dockerignore: -------------------------------------------------------------------------------- 1 | .venv 2 | *.lmdb 3 | dist/ 4 | -------------------------------------------------------------------------------- /tutorials/eboutique/microservices/currency/.minos-microservice.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minos-framework/minos-python/3427fdaed489d3b9330c80ce15d77975e0135b9c/tutorials/eboutique/microservices/currency/.minos-microservice.yaml -------------------------------------------------------------------------------- /tutorials/eboutique/microservices/currency/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM ghcr.io/clariteia/minos-microservice:0.1.8 as development 2 | 3 | COPY ./pyproject.toml ./poetry.lock ./ 4 | RUN poetry install --no-root 5 | COPY . . 6 | CMD ["poetry", "run", "microservice", "start"] 7 | 8 | FROM development as build 9 | RUN poetry export --without-hashes > req.txt && pip wheel -r req.txt --wheel-dir ./dist 10 | RUN poetry build --format wheel 11 | 12 | FROM python:3.9-slim as production 13 | COPY --from=build /microservice/dist/ ./dist 14 | RUN pip install --no-deps ./dist/* 15 | COPY config.yml ./config.yml 16 | ENTRYPOINT ["microservice"] 17 | CMD ["start"] 18 | -------------------------------------------------------------------------------- /tutorials/eboutique/microservices/currency/README.md: -------------------------------------------------------------------------------- 1 | # currency Microservice 2 | 3 | ## Description 4 | -------------------------------------------------------------------------------- /tutorials/eboutique/microservices/currency/poetry.toml: -------------------------------------------------------------------------------- 1 | [virtualenvs] 2 | in-project = true -------------------------------------------------------------------------------- /tutorials/eboutique/microservices/currency/setup.cfg: -------------------------------------------------------------------------------- 1 | [coverage:run] 2 | source = src 3 | 4 | [coverage:report] 5 | exclude_lines = 6 | pragma: no cover 7 | raise NotImplementedError 8 | if TYPE_CHECKING: 9 | pass 10 | precision = 2 11 | 12 | [flake8] 13 | filename = 14 | ./src/**/*.py, 15 | ./tests/**/*.py, 16 | max-line-length = 120 17 | per-file-ignores = 18 | ./**/__init__.py:F401,W391 19 | 20 | [isort] 21 | known_first_party = src,tests 22 | multi_line_output = 3 23 | include_trailing_comma = True 24 | force_grid_wrap = 1 25 | use_parentheses = True 26 | line_length = 120 27 | -------------------------------------------------------------------------------- /tutorials/eboutique/microservices/currency/src/__init__.py: -------------------------------------------------------------------------------- 1 | __author__ = "" 2 | __email__ = "" 3 | __version__ = "0.1.0" 4 | 5 | from .aggregates import ( 6 | Currency, 7 | ) 8 | from .cli import ( 9 | main, 10 | ) 11 | from .commands import ( 12 | CurrencyCommandService, 13 | ) 14 | from .queries import ( 15 | CurrencyQueryService, 16 | ) 17 | -------------------------------------------------------------------------------- /tutorials/eboutique/microservices/currency/src/__main__.py: -------------------------------------------------------------------------------- 1 | from .cli import ( 2 | main, 3 | ) 4 | 5 | if __name__ == "__main__": 6 | main() 7 | -------------------------------------------------------------------------------- /tutorials/eboutique/microservices/currency/src/aggregates.py: -------------------------------------------------------------------------------- 1 | from uuid import ( 2 | UUID, 3 | ) 4 | 5 | from minos.aggregate import ( 6 | Aggregate, 7 | RootEntity, 8 | ) 9 | 10 | 11 | class Currency(RootEntity): 12 | """Currency RootEntity class.""" 13 | 14 | 15 | class CurrencyAggregate(Aggregate[Currency]): 16 | """CurrencyAggregate class.""" 17 | 18 | @staticmethod 19 | async def create() -> UUID: 20 | """Create a new instance.""" 21 | root = await Currency.create() 22 | return root.uuid 23 | -------------------------------------------------------------------------------- /tutorials/eboutique/microservices/currency/src/commands/__init__.py: -------------------------------------------------------------------------------- 1 | from .services import ( 2 | CurrencyCommandService, 3 | ) 4 | -------------------------------------------------------------------------------- /tutorials/eboutique/microservices/currency/src/currency_files/ecb_20220314.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minos-framework/minos-python/3427fdaed489d3b9330c80ce15d77975e0135b9c/tutorials/eboutique/microservices/currency/src/currency_files/ecb_20220314.zip -------------------------------------------------------------------------------- /tutorials/eboutique/microservices/currency/src/queries/__init__.py: -------------------------------------------------------------------------------- 1 | from .services import ( 2 | CurrencyQueryService, 3 | ) 4 | -------------------------------------------------------------------------------- /tutorials/eboutique/microservices/currency/tests/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minos-framework/minos-python/3427fdaed489d3b9330c80ce15d77975e0135b9c/tutorials/eboutique/microservices/currency/tests/__init__.py -------------------------------------------------------------------------------- /tutorials/eboutique/microservices/currency/tests/test_commands/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minos-framework/minos-python/3427fdaed489d3b9330c80ce15d77975e0135b9c/tutorials/eboutique/microservices/currency/tests/test_commands/__init__.py -------------------------------------------------------------------------------- /tutorials/eboutique/microservices/currency/tests/test_queries/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minos-framework/minos-python/3427fdaed489d3b9330c80ce15d77975e0135b9c/tutorials/eboutique/microservices/currency/tests/test_queries/__init__.py -------------------------------------------------------------------------------- /tutorials/eboutique/microservices/notifier/.build_docker_compose.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minos-framework/minos-python/3427fdaed489d3b9330c80ce15d77975e0135b9c/tutorials/eboutique/microservices/notifier/.build_docker_compose.txt -------------------------------------------------------------------------------- /tutorials/eboutique/microservices/notifier/.dockerignore: -------------------------------------------------------------------------------- 1 | .venv 2 | *.lmdb 3 | dist/ 4 | -------------------------------------------------------------------------------- /tutorials/eboutique/microservices/notifier/.minos-microservice.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minos-framework/minos-python/3427fdaed489d3b9330c80ce15d77975e0135b9c/tutorials/eboutique/microservices/notifier/.minos-microservice.yaml -------------------------------------------------------------------------------- /tutorials/eboutique/microservices/notifier/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM ghcr.io/clariteia/minos-microservice:0.1.8 as development 2 | 3 | COPY ./pyproject.toml ./ 4 | RUN poetry install --no-root 5 | COPY . . 6 | CMD ["poetry", "run", "microservice", "start"] 7 | 8 | FROM development as build 9 | RUN poetry export --without-hashes > req.txt && pip wheel -r req.txt --wheel-dir ./dist 10 | RUN poetry build --format wheel 11 | 12 | FROM python:3.9-slim as production 13 | COPY --from=build /microservice/dist/ ./dist 14 | RUN pip install --no-deps ./dist/* 15 | COPY config.yml ./config.yml 16 | ENTRYPOINT ["microservice"] 17 | CMD ["start"] 18 | -------------------------------------------------------------------------------- /tutorials/eboutique/microservices/notifier/README.md: -------------------------------------------------------------------------------- 1 | # notifier Microservice 2 | 3 | ## Description 4 | -------------------------------------------------------------------------------- /tutorials/eboutique/microservices/notifier/playbooks/create-database.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Create Database 3 | import_playbook: ../../../external/postgres/playbooks/create-database.yaml 4 | vars: 5 | db_name: notifier_db -------------------------------------------------------------------------------- /tutorials/eboutique/microservices/notifier/playbooks/deploy.yaml: -------------------------------------------------------------------------------- 1 | - name: Create Database 2 | import_playbook: create-database.yaml 3 | - name: Create Query Database 4 | import_playbook: create-database.yaml 5 | - name: Lock Dependencies 6 | import_playbook: lock.yaml 7 | -------------------------------------------------------------------------------- /tutorials/eboutique/microservices/notifier/playbooks/install.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | - hosts: localhost 3 | connection: local 4 | tasks: 5 | - name: Install Package 6 | shell: poetry install 7 | args: 8 | chdir: ../ 9 | register: results 10 | 11 | - debug: var=results.stdout_lines 12 | 13 | - debug: var=results.stderr_lines 14 | -------------------------------------------------------------------------------- /tutorials/eboutique/microservices/notifier/playbooks/lint.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | - hosts: localhost 3 | connection: local 4 | tasks: 5 | - name: Check Syntax 6 | shell: poetry run flake8 7 | args: 8 | chdir: ../ 9 | register: results 10 | 11 | - debug: var=results.stdout_lines 12 | 13 | - debug: var=results.stderr_lines 14 | -------------------------------------------------------------------------------- /tutorials/eboutique/microservices/notifier/playbooks/lock.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | - hosts: localhost 3 | connection: local 4 | tasks: 5 | - name: Lock Dependencies 6 | shell: poetry lock 7 | args: 8 | chdir: ../ 9 | register: results 10 | 11 | - debug: var=results.stdout_lines 12 | 13 | - debug: var=results.stderr_lines 14 | -------------------------------------------------------------------------------- /tutorials/eboutique/microservices/notifier/playbooks/reformat.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | - hosts: localhost 3 | connection: local 4 | tasks: 5 | - name: Format Code 6 | shell: poetry run black --line-length 120 src tests 7 | args: 8 | chdir: ../ 9 | register: results 10 | 11 | - debug: var=results.stdout_lines 12 | 13 | - debug: var=results.stderr_lines 14 | 15 | - name: Sort Imports 16 | shell: poetry run isort src tests 17 | args: 18 | chdir: ../ 19 | register: results 20 | 21 | - debug: var=results.stdout_lines 22 | 23 | - debug: var=results.stderr_lines 24 | -------------------------------------------------------------------------------- /tutorials/eboutique/microservices/notifier/playbooks/test.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | - hosts: localhost 3 | connection: local 4 | tasks: 5 | - name: Test package 6 | shell: poetry install 7 | args: 8 | chdir: ../ 9 | register: results 10 | 11 | - debug: var=results.stdout_lines 12 | 13 | - debug: var=results.stderr_lines 14 | -------------------------------------------------------------------------------- /tutorials/eboutique/microservices/notifier/playbooks/update.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | - hosts: localhost 3 | connection: local 4 | tasks: 5 | - name: Update Package Dependencies 6 | shell: poetry run pytest 7 | args: 8 | chdir: ../ 9 | register: results 10 | 11 | - debug: var=results.stdout_lines 12 | 13 | - debug: var=results.stderr_lines 14 | -------------------------------------------------------------------------------- /tutorials/eboutique/microservices/notifier/poetry.toml: -------------------------------------------------------------------------------- 1 | [virtualenvs] 2 | in-project = true -------------------------------------------------------------------------------- /tutorials/eboutique/microservices/notifier/setup.cfg: -------------------------------------------------------------------------------- 1 | [coverage:run] 2 | source = src 3 | 4 | [coverage:report] 5 | exclude_lines = 6 | pragma: no cover 7 | raise NotImplementedError 8 | if TYPE_CHECKING: 9 | pass 10 | precision = 2 11 | 12 | [flake8] 13 | filename = 14 | ./src/**/*.py, 15 | ./tests/**/*.py, 16 | max-line-length = 120 17 | per-file-ignores = 18 | ./**/__init__.py:F401,W391 19 | 20 | [isort] 21 | known_first_party = src,tests 22 | multi_line_output = 3 23 | include_trailing_comma = True 24 | force_grid_wrap = 1 25 | use_parentheses = True 26 | line_length = 120 27 | -------------------------------------------------------------------------------- /tutorials/eboutique/microservices/notifier/src/__init__.py: -------------------------------------------------------------------------------- 1 | __author__ = "" 2 | __email__ = "" 3 | __version__ = "0.1.0" 4 | 5 | from .aggregates import ( 6 | Notifier, 7 | ) 8 | from .cli import ( 9 | main, 10 | ) 11 | from .commands import ( 12 | NotifierCommandService, 13 | ) 14 | from .queries import ( 15 | NotifierQueryService, 16 | NotifierQueryServiceRepository, 17 | ) 18 | -------------------------------------------------------------------------------- /tutorials/eboutique/microservices/notifier/src/__main__.py: -------------------------------------------------------------------------------- 1 | from .cli import ( 2 | main, 3 | ) 4 | 5 | if __name__ == "__main__": 6 | main() 7 | -------------------------------------------------------------------------------- /tutorials/eboutique/microservices/notifier/src/aggregates.py: -------------------------------------------------------------------------------- 1 | from uuid import ( 2 | UUID, 3 | ) 4 | 5 | from minos.aggregate import ( 6 | Aggregate, 7 | RootEntity, 8 | ) 9 | 10 | 11 | class Notifier(RootEntity): 12 | """Notifier RootEntity class.""" 13 | 14 | 15 | class NotifierAggregate(Aggregate[Notifier]): 16 | """NotifierAggregate class.""" 17 | 18 | @staticmethod 19 | async def create() -> UUID: 20 | """Create a new instance.""" 21 | root = await Notifier.create() 22 | return root.uuid 23 | -------------------------------------------------------------------------------- /tutorials/eboutique/microservices/notifier/src/commands/__init__.py: -------------------------------------------------------------------------------- 1 | from .services import ( 2 | NotifierCommandService, 3 | ) 4 | -------------------------------------------------------------------------------- /tutorials/eboutique/microservices/notifier/src/queries/__init__.py: -------------------------------------------------------------------------------- 1 | from .repository import ( 2 | NotifierQueryServiceRepository, 3 | ) 4 | from .services import ( 5 | NotifierQueryService, 6 | ) 7 | -------------------------------------------------------------------------------- /tutorials/eboutique/microservices/notifier/src/queries/models.py: -------------------------------------------------------------------------------- 1 | from sqlalchemy.orm import ( 2 | declarative_base, 3 | ) 4 | 5 | Base = declarative_base() 6 | -------------------------------------------------------------------------------- /tutorials/eboutique/microservices/notifier/tests/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minos-framework/minos-python/3427fdaed489d3b9330c80ce15d77975e0135b9c/tutorials/eboutique/microservices/notifier/tests/__init__.py -------------------------------------------------------------------------------- /tutorials/eboutique/microservices/notifier/tests/test_commands/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minos-framework/minos-python/3427fdaed489d3b9330c80ce15d77975e0135b9c/tutorials/eboutique/microservices/notifier/tests/test_commands/__init__.py -------------------------------------------------------------------------------- /tutorials/eboutique/microservices/payment/.dockerignore: -------------------------------------------------------------------------------- 1 | .venv 2 | *.lmdb 3 | dist/ 4 | -------------------------------------------------------------------------------- /tutorials/eboutique/microservices/payment/.minos-microservice.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minos-framework/minos-python/3427fdaed489d3b9330c80ce15d77975e0135b9c/tutorials/eboutique/microservices/payment/.minos-microservice.yaml -------------------------------------------------------------------------------- /tutorials/eboutique/microservices/payment/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM ghcr.io/clariteia/minos-microservice:0.1.8 as development 2 | 3 | COPY ./pyproject.toml ./ 4 | RUN poetry install --no-root 5 | COPY . . 6 | CMD ["poetry", "run", "microservice", "start"] 7 | 8 | FROM development as build 9 | RUN poetry export --without-hashes > req.txt && pip wheel -r req.txt --wheel-dir ./dist 10 | RUN poetry build --format wheel 11 | 12 | FROM python:3.9-slim as production 13 | COPY --from=build /microservice/dist/ ./dist 14 | RUN pip install --no-deps ./dist/* 15 | COPY config.yml ./config.yml 16 | ENTRYPOINT ["microservice"] 17 | CMD ["start"] 18 | -------------------------------------------------------------------------------- /tutorials/eboutique/microservices/payment/README.md: -------------------------------------------------------------------------------- 1 | # payment Microservice 2 | 3 | ## Description 4 | -------------------------------------------------------------------------------- /tutorials/eboutique/microservices/payment/playbooks/create-database.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Create Database 3 | import_playbook: ../../../external/postgres/playbooks/create-database.yaml 4 | vars: 5 | db_name: payment_db -------------------------------------------------------------------------------- /tutorials/eboutique/microservices/payment/playbooks/deploy.yaml: -------------------------------------------------------------------------------- 1 | - name: Create Database 2 | import_playbook: create-database.yaml 3 | - name: Create Query Database 4 | import_playbook: create-database.yaml 5 | - name: Lock Dependencies 6 | import_playbook: lock.yaml 7 | -------------------------------------------------------------------------------- /tutorials/eboutique/microservices/payment/playbooks/install.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | - hosts: localhost 3 | connection: local 4 | tasks: 5 | - name: Install Package 6 | shell: poetry install 7 | args: 8 | chdir: ../ 9 | register: results 10 | 11 | - debug: var=results.stdout_lines 12 | 13 | - debug: var=results.stderr_lines 14 | -------------------------------------------------------------------------------- /tutorials/eboutique/microservices/payment/playbooks/lint.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | - hosts: localhost 3 | connection: local 4 | tasks: 5 | - name: Check Syntax 6 | shell: poetry run flake8 7 | args: 8 | chdir: ../ 9 | register: results 10 | 11 | - debug: var=results.stdout_lines 12 | 13 | - debug: var=results.stderr_lines 14 | -------------------------------------------------------------------------------- /tutorials/eboutique/microservices/payment/playbooks/lock.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | - hosts: localhost 3 | connection: local 4 | tasks: 5 | - name: Lock Dependencies 6 | shell: poetry lock 7 | args: 8 | chdir: ../ 9 | register: results 10 | 11 | - debug: var=results.stdout_lines 12 | 13 | - debug: var=results.stderr_lines 14 | -------------------------------------------------------------------------------- /tutorials/eboutique/microservices/payment/playbooks/reformat.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | - hosts: localhost 3 | connection: local 4 | tasks: 5 | - name: Format Code 6 | shell: poetry run black --line-length 120 src tests 7 | args: 8 | chdir: ../ 9 | register: results 10 | 11 | - debug: var=results.stdout_lines 12 | 13 | - debug: var=results.stderr_lines 14 | 15 | - name: Sort Imports 16 | shell: poetry run isort src tests 17 | args: 18 | chdir: ../ 19 | register: results 20 | 21 | - debug: var=results.stdout_lines 22 | 23 | - debug: var=results.stderr_lines 24 | -------------------------------------------------------------------------------- /tutorials/eboutique/microservices/payment/playbooks/test.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | - hosts: localhost 3 | connection: local 4 | tasks: 5 | - name: Test package 6 | shell: poetry install 7 | args: 8 | chdir: ../ 9 | register: results 10 | 11 | - debug: var=results.stdout_lines 12 | 13 | - debug: var=results.stderr_lines 14 | -------------------------------------------------------------------------------- /tutorials/eboutique/microservices/payment/playbooks/update.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | - hosts: localhost 3 | connection: local 4 | tasks: 5 | - name: Update Package Dependencies 6 | shell: poetry run pytest 7 | args: 8 | chdir: ../ 9 | register: results 10 | 11 | - debug: var=results.stdout_lines 12 | 13 | - debug: var=results.stderr_lines 14 | -------------------------------------------------------------------------------- /tutorials/eboutique/microservices/payment/poetry.toml: -------------------------------------------------------------------------------- 1 | [virtualenvs] 2 | in-project = true -------------------------------------------------------------------------------- /tutorials/eboutique/microservices/payment/setup.cfg: -------------------------------------------------------------------------------- 1 | [coverage:run] 2 | source = src 3 | 4 | [coverage:report] 5 | exclude_lines = 6 | pragma: no cover 7 | raise NotImplementedError 8 | if TYPE_CHECKING: 9 | pass 10 | precision = 2 11 | 12 | [flake8] 13 | filename = 14 | ./src/**/*.py, 15 | ./tests/**/*.py, 16 | max-line-length = 120 17 | per-file-ignores = 18 | ./**/__init__.py:F401,W391 19 | 20 | [isort] 21 | known_first_party = src,tests 22 | multi_line_output = 3 23 | include_trailing_comma = True 24 | force_grid_wrap = 1 25 | use_parentheses = True 26 | line_length = 120 27 | -------------------------------------------------------------------------------- /tutorials/eboutique/microservices/payment/src/__init__.py: -------------------------------------------------------------------------------- 1 | __author__ = "" 2 | __email__ = "" 3 | __version__ = "0.1.0" 4 | 5 | from .aggregates import ( 6 | Payment, 7 | ) 8 | from .cli import ( 9 | main, 10 | ) 11 | from .commands import ( 12 | PaymentCommandService, 13 | ) 14 | from .queries import ( 15 | PaymentQueryService, 16 | PaymentQueryServiceRepository, 17 | ) 18 | -------------------------------------------------------------------------------- /tutorials/eboutique/microservices/payment/src/__main__.py: -------------------------------------------------------------------------------- 1 | from .cli import ( 2 | main, 3 | ) 4 | 5 | if __name__ == "__main__": 6 | main() 7 | -------------------------------------------------------------------------------- /tutorials/eboutique/microservices/payment/src/commands/__init__.py: -------------------------------------------------------------------------------- 1 | from .services import ( 2 | PaymentCommandService, 3 | ) 4 | -------------------------------------------------------------------------------- /tutorials/eboutique/microservices/payment/src/queries/__init__.py: -------------------------------------------------------------------------------- 1 | from .repository import ( 2 | PaymentQueryServiceRepository, 3 | ) 4 | from .services import ( 5 | PaymentQueryService, 6 | ) 7 | -------------------------------------------------------------------------------- /tutorials/eboutique/microservices/payment/src/queries/models.py: -------------------------------------------------------------------------------- 1 | from sqlalchemy.orm import ( 2 | declarative_base, 3 | ) 4 | 5 | Base = declarative_base() 6 | -------------------------------------------------------------------------------- /tutorials/eboutique/microservices/payment/tests/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minos-framework/minos-python/3427fdaed489d3b9330c80ce15d77975e0135b9c/tutorials/eboutique/microservices/payment/tests/__init__.py -------------------------------------------------------------------------------- /tutorials/eboutique/microservices/payment/tests/test_commands/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minos-framework/minos-python/3427fdaed489d3b9330c80ce15d77975e0135b9c/tutorials/eboutique/microservices/payment/tests/test_commands/__init__.py -------------------------------------------------------------------------------- /tutorials/eboutique/microservices/payment/tests/test_queries/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minos-framework/minos-python/3427fdaed489d3b9330c80ce15d77975e0135b9c/tutorials/eboutique/microservices/payment/tests/test_queries/__init__.py -------------------------------------------------------------------------------- /tutorials/eboutique/microservices/product/.dockerignore: -------------------------------------------------------------------------------- 1 | .venv 2 | *.lmdb 3 | dist/ 4 | -------------------------------------------------------------------------------- /tutorials/eboutique/microservices/product/.minos-microservice.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minos-framework/minos-python/3427fdaed489d3b9330c80ce15d77975e0135b9c/tutorials/eboutique/microservices/product/.minos-microservice.yaml -------------------------------------------------------------------------------- /tutorials/eboutique/microservices/product/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM ghcr.io/clariteia/minos-microservice:0.1.8 as development 2 | 3 | COPY ./pyproject.toml ./poetry.lock ./ 4 | RUN poetry install --no-root 5 | COPY . . 6 | CMD ["poetry", "run", "microservice", "start"] 7 | 8 | FROM development as build 9 | RUN poetry export --without-hashes > req.txt && pip wheel -r req.txt --wheel-dir ./dist 10 | RUN poetry build --format wheel 11 | 12 | FROM python:3.9-slim as production 13 | COPY --from=build /microservice/dist/ ./dist 14 | RUN pip install --no-deps ./dist/* 15 | COPY config.yml ./config.yml 16 | ENTRYPOINT ["microservice"] 17 | CMD ["start"] 18 | -------------------------------------------------------------------------------- /tutorials/eboutique/microservices/product/README.md: -------------------------------------------------------------------------------- 1 | # product Microservice 2 | 3 | ## Description 4 | -------------------------------------------------------------------------------- /tutorials/eboutique/microservices/product/poetry.toml: -------------------------------------------------------------------------------- 1 | [virtualenvs] 2 | in-project = true -------------------------------------------------------------------------------- /tutorials/eboutique/microservices/product/setup.cfg: -------------------------------------------------------------------------------- 1 | [coverage:run] 2 | source = src 3 | 4 | [coverage:report] 5 | exclude_lines = 6 | pragma: no cover 7 | raise NotImplementedError 8 | if TYPE_CHECKING: 9 | pass 10 | precision = 2 11 | 12 | [flake8] 13 | filename = 14 | ./src/**/*.py, 15 | ./tests/**/*.py, 16 | max-line-length = 120 17 | per-file-ignores = 18 | ./**/__init__.py:F401,W391 19 | 20 | [isort] 21 | known_first_party = src,tests 22 | multi_line_output = 3 23 | include_trailing_comma = True 24 | force_grid_wrap = 1 25 | use_parentheses = True 26 | line_length = 120 27 | -------------------------------------------------------------------------------- /tutorials/eboutique/microservices/product/src/__init__.py: -------------------------------------------------------------------------------- 1 | __author__ = "" 2 | __email__ = "" 3 | __version__ = "0.1.0" 4 | 5 | from .aggregates import ( 6 | Product, 7 | ) 8 | from .cli import ( 9 | main, 10 | ) 11 | from .commands import ( 12 | ProductCommandService, 13 | ) 14 | from .queries import ( 15 | ProductQueryRepository, 16 | ProductQueryService, 17 | ) 18 | -------------------------------------------------------------------------------- /tutorials/eboutique/microservices/product/src/__main__.py: -------------------------------------------------------------------------------- 1 | from .cli import ( 2 | main, 3 | ) 4 | 5 | if __name__ == "__main__": 6 | main() 7 | -------------------------------------------------------------------------------- /tutorials/eboutique/microservices/product/src/commands/__init__.py: -------------------------------------------------------------------------------- 1 | from .services import ( 2 | ProductCommandService, 3 | ) 4 | -------------------------------------------------------------------------------- /tutorials/eboutique/microservices/product/src/queries/__init__.py: -------------------------------------------------------------------------------- 1 | from .repository import ( 2 | ProductQueryRepository, 3 | ) 4 | from .services import ( 5 | ProductQueryService, 6 | ) 7 | -------------------------------------------------------------------------------- /tutorials/eboutique/microservices/product/tests/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minos-framework/minos-python/3427fdaed489d3b9330c80ce15d77975e0135b9c/tutorials/eboutique/microservices/product/tests/__init__.py -------------------------------------------------------------------------------- /tutorials/eboutique/microservices/shipping/.dockerignore: -------------------------------------------------------------------------------- 1 | .venv 2 | *.lmdb 3 | dist/ 4 | -------------------------------------------------------------------------------- /tutorials/eboutique/microservices/shipping/.minos-microservice.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minos-framework/minos-python/3427fdaed489d3b9330c80ce15d77975e0135b9c/tutorials/eboutique/microservices/shipping/.minos-microservice.yaml -------------------------------------------------------------------------------- /tutorials/eboutique/microservices/shipping/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM ghcr.io/clariteia/minos-microservice:0.1.8 as development 2 | 3 | COPY ./pyproject.toml ./poetry.lock ./ 4 | RUN poetry install --no-root 5 | COPY . . 6 | CMD ["poetry", "run", "microservice", "start"] 7 | 8 | FROM development as build 9 | RUN poetry export --without-hashes > req.txt && pip wheel -r req.txt --wheel-dir ./dist 10 | RUN poetry build --format wheel 11 | 12 | FROM python:3.9-slim as production 13 | COPY --from=build /microservice/dist/ ./dist 14 | RUN pip install --no-deps ./dist/* 15 | COPY config.yml ./config.yml 16 | ENTRYPOINT ["microservice"] 17 | CMD ["start"] 18 | -------------------------------------------------------------------------------- /tutorials/eboutique/microservices/shipping/README.md: -------------------------------------------------------------------------------- 1 | # shipping Microservice 2 | 3 | ## Description 4 | -------------------------------------------------------------------------------- /tutorials/eboutique/microservices/shipping/poetry.toml: -------------------------------------------------------------------------------- 1 | [virtualenvs] 2 | in-project = true -------------------------------------------------------------------------------- /tutorials/eboutique/microservices/shipping/setup.cfg: -------------------------------------------------------------------------------- 1 | [coverage:run] 2 | source = src 3 | 4 | [coverage:report] 5 | exclude_lines = 6 | pragma: no cover 7 | raise NotImplementedError 8 | if TYPE_CHECKING: 9 | pass 10 | precision = 2 11 | 12 | [flake8] 13 | filename = 14 | ./src/**/*.py, 15 | ./tests/**/*.py, 16 | max-line-length = 120 17 | per-file-ignores = 18 | ./**/__init__.py:F401,W391 19 | 20 | [isort] 21 | known_first_party = src,tests 22 | multi_line_output = 3 23 | include_trailing_comma = True 24 | force_grid_wrap = 1 25 | use_parentheses = True 26 | line_length = 120 27 | -------------------------------------------------------------------------------- /tutorials/eboutique/microservices/shipping/src/__init__.py: -------------------------------------------------------------------------------- 1 | __author__ = "" 2 | __email__ = "" 3 | __version__ = "0.1.0" 4 | 5 | from .aggregates import ( 6 | Shipping, 7 | ) 8 | from .cli import ( 9 | main, 10 | ) 11 | from .commands import ( 12 | ShippingCommandService, 13 | ) 14 | from .queries import ( 15 | ShippingQueryService, 16 | ) 17 | -------------------------------------------------------------------------------- /tutorials/eboutique/microservices/shipping/src/__main__.py: -------------------------------------------------------------------------------- 1 | from .cli import ( 2 | main, 3 | ) 4 | 5 | if __name__ == "__main__": 6 | main() 7 | -------------------------------------------------------------------------------- /tutorials/eboutique/microservices/shipping/src/aggregates.py: -------------------------------------------------------------------------------- 1 | from minos.aggregate import ( 2 | Aggregate, 3 | RootEntity, 4 | ) 5 | 6 | 7 | class Shipping(RootEntity): 8 | """Shipping RootEntity class.""" 9 | 10 | 11 | class ShippingAggregate(Aggregate[Shipping]): 12 | """ShippingAggregate class.""" 13 | -------------------------------------------------------------------------------- /tutorials/eboutique/microservices/shipping/src/commands/__init__.py: -------------------------------------------------------------------------------- 1 | from .services import ( 2 | ShippingCommandService, 3 | ) 4 | -------------------------------------------------------------------------------- /tutorials/eboutique/microservices/shipping/src/queries/__init__.py: -------------------------------------------------------------------------------- 1 | from .services import ( 2 | ShippingQueryService, 3 | ) 4 | -------------------------------------------------------------------------------- /tutorials/eboutique/microservices/shipping/tests/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minos-framework/minos-python/3427fdaed489d3b9330c80ce15d77975e0135b9c/tutorials/eboutique/microservices/shipping/tests/__init__.py -------------------------------------------------------------------------------- /tutorials/eboutique/microservices/shipping/tests/test_commands/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minos-framework/minos-python/3427fdaed489d3b9330c80ce15d77975e0135b9c/tutorials/eboutique/microservices/shipping/tests/test_commands/__init__.py -------------------------------------------------------------------------------- /tutorials/stock-wallet/.minos-answers.yml: -------------------------------------------------------------------------------- 1 | apigateway: minos 2 | apigateway_deploy: self-hosted 3 | broker: kafka 4 | broker_deploy: self-hosted 5 | database: postgres 6 | discovery: minos 7 | discovery_database: redis 8 | discovery_deploy: self-hosted 9 | postgres_deploy: self-hosted 10 | project_deploy: docker-compose 11 | project_description: A Microservice example for stock options 12 | project_name: stock-wallet 13 | project_version: 0.1.0 14 | redis_deploy: self-hosted 15 | template_name: project-init 16 | template_registry: https://github.com/minos-framework/minos-templates/releases/download/v0.1.3 17 | template_version: v0.1.3 18 | -------------------------------------------------------------------------------- /tutorials/stock-wallet/.minos-project.yaml: -------------------------------------------------------------------------------- 1 | services: 2 | database: postgres 3 | broker: kafka 4 | discovery: minos 5 | apigateway: minos 6 | -------------------------------------------------------------------------------- /tutorials/stock-wallet/README.md: -------------------------------------------------------------------------------- 1 | # stock-wallet Project 2 | 3 | ## Description 4 | A Microservice example for stock options -------------------------------------------------------------------------------- /tutorials/stock-wallet/external/README.md: -------------------------------------------------------------------------------- 1 | # stock-wallet - External -------------------------------------------------------------------------------- /tutorials/stock-wallet/external/apigateway/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM python 2 | 3 | RUN pip install minos-apigateway==0.1.0 4 | 5 | COPY config.yml ./config.yml 6 | CMD ["api_gateway", "start", "config.yml"] 7 | -------------------------------------------------------------------------------- /tutorials/stock-wallet/external/apigateway/config.yml: -------------------------------------------------------------------------------- 1 | rest: 2 | host: 0.0.0.0 3 | port: 5566 4 | cors: 5 | enabled: true 6 | auth: 7 | host: localhost 8 | port: 8092 9 | method: POST 10 | path: /validate-token 11 | discovery: 12 | host: localhost 13 | port: 5567 14 | -------------------------------------------------------------------------------- /tutorials/stock-wallet/external/discovery/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM python 2 | 3 | RUN apt install git 4 | RUN pip install minos-discovery==0.0.8 5 | 6 | COPY config.yml ./config.yml 7 | CMD ["discovery", "start", "config.yml"] 8 | -------------------------------------------------------------------------------- /tutorials/stock-wallet/external/discovery/config.yml: -------------------------------------------------------------------------------- 1 | discovery: 2 | host: 0.0.0.0 3 | port: 5566 4 | path: "" 5 | endpoints: [] 6 | db: 7 | host: localhost 8 | port: 6379 9 | password: 10 | -------------------------------------------------------------------------------- /tutorials/stock-wallet/external/postgres/10-create-database.sql: -------------------------------------------------------------------------------- 1 | DROP DATABASE IF EXISTS wallet_db; 2 | DROP DATABASE IF EXISTS wallet_query_db; 3 | 4 | CREATE DATABASE wallet_db; 5 | CREATE DATABASE wallet_query_db; 6 | 7 | CREATE DATABASE stocks_db; 8 | CREATE DATABASE stocks_query_db; 9 | CREATE DATABASE crypto_db; 10 | CREATE DATABASE crypto_query_db; -------------------------------------------------------------------------------- /tutorials/stock-wallet/external/postgres/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM postgres:14.2 2 | COPY 10-create-database.sql /docker-entrypoint-initdb.d/10-create-database.sql 3 | -------------------------------------------------------------------------------- /tutorials/stock-wallet/microservices/README.md: -------------------------------------------------------------------------------- 1 | # stock-wallet - Microservices -------------------------------------------------------------------------------- /tutorials/stock-wallet/microservices/crypto/.dockerignore: -------------------------------------------------------------------------------- 1 | .venv 2 | *.lmdb 3 | dist/ 4 | -------------------------------------------------------------------------------- /tutorials/stock-wallet/microservices/crypto/.minos-microservice.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minos-framework/minos-python/3427fdaed489d3b9330c80ce15d77975e0135b9c/tutorials/stock-wallet/microservices/crypto/.minos-microservice.yaml -------------------------------------------------------------------------------- /tutorials/stock-wallet/microservices/crypto/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM ghcr.io/clariteia/minos-microservice:0.1.8 as development 2 | 3 | COPY ./pyproject.toml ./ 4 | RUN poetry install --no-root 5 | COPY . . 6 | CMD ["poetry", "run", "microservice", "start"] 7 | 8 | FROM development as build 9 | RUN poetry export --without-hashes > req.txt && pip wheel -r req.txt --wheel-dir ./dist 10 | RUN poetry build --format wheel 11 | 12 | FROM python:3.9-slim as production 13 | COPY --from=build /microservice/dist/ ./dist 14 | RUN pip install --no-deps ./dist/* 15 | COPY config.yml ./config.yml 16 | ENTRYPOINT ["microservice"] 17 | CMD ["start"] 18 | -------------------------------------------------------------------------------- /tutorials/stock-wallet/microservices/crypto/README.md: -------------------------------------------------------------------------------- 1 | # crypto Microservice 2 | 3 | ## Description 4 | -------------------------------------------------------------------------------- /tutorials/stock-wallet/microservices/crypto/poetry.toml: -------------------------------------------------------------------------------- 1 | [virtualenvs] 2 | in-project = true -------------------------------------------------------------------------------- /tutorials/stock-wallet/microservices/crypto/setup.cfg: -------------------------------------------------------------------------------- 1 | [coverage:run] 2 | source = src 3 | 4 | [coverage:report] 5 | exclude_lines = 6 | pragma: no cover 7 | raise NotImplementedError 8 | if TYPE_CHECKING: 9 | pass 10 | precision = 2 11 | 12 | [flake8] 13 | filename = 14 | ./src/**/*.py, 15 | ./tests/**/*.py, 16 | max-line-length = 120 17 | per-file-ignores = 18 | ./**/__init__.py:F401,W391 19 | 20 | [isort] 21 | known_first_party = src,tests 22 | multi_line_output = 3 23 | include_trailing_comma = True 24 | force_grid_wrap = 1 25 | use_parentheses = True 26 | line_length = 120 27 | -------------------------------------------------------------------------------- /tutorials/stock-wallet/microservices/crypto/src/__init__.py: -------------------------------------------------------------------------------- 1 | __author__ = "" 2 | __email__ = "" 3 | __version__ = "0.1.0" 4 | 5 | from .aggregates import ( 6 | Crypto, 7 | ) 8 | from .cli import ( 9 | main, 10 | ) 11 | from .commands import ( 12 | CryptoCommandService, 13 | ) 14 | from .queries import ( 15 | CryptoQueryService, 16 | CryptoQueryServiceRepository, 17 | ) 18 | -------------------------------------------------------------------------------- /tutorials/stock-wallet/microservices/crypto/src/__main__.py: -------------------------------------------------------------------------------- 1 | from .cli import ( 2 | main, 3 | ) 4 | 5 | if __name__ == "__main__": 6 | main() 7 | -------------------------------------------------------------------------------- /tutorials/stock-wallet/microservices/crypto/src/commands/__init__.py: -------------------------------------------------------------------------------- 1 | from .services import ( 2 | CryptoCommandService, 3 | ) 4 | -------------------------------------------------------------------------------- /tutorials/stock-wallet/microservices/crypto/src/queries/__init__.py: -------------------------------------------------------------------------------- 1 | from .repository import ( 2 | CryptoQueryServiceRepository, 3 | ) 4 | from .services import ( 5 | CryptoQueryService, 6 | ) 7 | -------------------------------------------------------------------------------- /tutorials/stock-wallet/microservices/crypto/src/queries/models.py: -------------------------------------------------------------------------------- 1 | from sqlalchemy.orm import ( 2 | declarative_base, 3 | ) 4 | 5 | Base = declarative_base() 6 | -------------------------------------------------------------------------------- /tutorials/stock-wallet/microservices/crypto/tests/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minos-framework/minos-python/3427fdaed489d3b9330c80ce15d77975e0135b9c/tutorials/stock-wallet/microservices/crypto/tests/__init__.py -------------------------------------------------------------------------------- /tutorials/stock-wallet/microservices/crypto/tests/test_commands/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minos-framework/minos-python/3427fdaed489d3b9330c80ce15d77975e0135b9c/tutorials/stock-wallet/microservices/crypto/tests/test_commands/__init__.py -------------------------------------------------------------------------------- /tutorials/stock-wallet/microservices/crypto/tests/test_queries/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minos-framework/minos-python/3427fdaed489d3b9330c80ce15d77975e0135b9c/tutorials/stock-wallet/microservices/crypto/tests/test_queries/__init__.py -------------------------------------------------------------------------------- /tutorials/stock-wallet/microservices/stocks/.dockerignore: -------------------------------------------------------------------------------- 1 | .venv 2 | *.lmdb 3 | dist/ 4 | -------------------------------------------------------------------------------- /tutorials/stock-wallet/microservices/stocks/.minos-microservice.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minos-framework/minos-python/3427fdaed489d3b9330c80ce15d77975e0135b9c/tutorials/stock-wallet/microservices/stocks/.minos-microservice.yaml -------------------------------------------------------------------------------- /tutorials/stock-wallet/microservices/stocks/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM ghcr.io/clariteia/minos-microservice:0.1.8 as development 2 | 3 | COPY ./pyproject.toml ./ 4 | RUN poetry install --no-root 5 | COPY . . 6 | CMD ["poetry", "run", "microservice", "start"] 7 | 8 | FROM development as build 9 | RUN poetry export --without-hashes > req.txt && pip wheel -r req.txt --wheel-dir ./dist 10 | RUN poetry build --format wheel 11 | 12 | FROM python:3.9-slim as production 13 | COPY --from=build /microservice/dist/ ./dist 14 | RUN pip install --no-deps ./dist/* 15 | COPY config.yml ./config.yml 16 | ENTRYPOINT ["microservice"] 17 | CMD ["start"] 18 | -------------------------------------------------------------------------------- /tutorials/stock-wallet/microservices/stocks/README.md: -------------------------------------------------------------------------------- 1 | # stocks Microservice 2 | 3 | ## Description 4 | -------------------------------------------------------------------------------- /tutorials/stock-wallet/microservices/stocks/poetry.toml: -------------------------------------------------------------------------------- 1 | [virtualenvs] 2 | in-project = true -------------------------------------------------------------------------------- /tutorials/stock-wallet/microservices/stocks/setup.cfg: -------------------------------------------------------------------------------- 1 | [coverage:run] 2 | source = src 3 | 4 | [coverage:report] 5 | exclude_lines = 6 | pragma: no cover 7 | raise NotImplementedError 8 | if TYPE_CHECKING: 9 | pass 10 | precision = 2 11 | 12 | [flake8] 13 | filename = 14 | ./src/**/*.py, 15 | ./tests/**/*.py, 16 | max-line-length = 120 17 | per-file-ignores = 18 | ./**/__init__.py:F401,W391 19 | 20 | [isort] 21 | known_first_party = src,tests 22 | multi_line_output = 3 23 | include_trailing_comma = True 24 | force_grid_wrap = 1 25 | use_parentheses = True 26 | line_length = 120 27 | -------------------------------------------------------------------------------- /tutorials/stock-wallet/microservices/stocks/src/__init__.py: -------------------------------------------------------------------------------- 1 | __author__ = "" 2 | __email__ = "" 3 | __version__ = "0.1.0" 4 | 5 | from .aggregates import ( 6 | Stocks, 7 | ) 8 | from .cli import ( 9 | main, 10 | ) 11 | from .commands import ( 12 | StocksCommandService, 13 | ) 14 | from .queries import ( 15 | StocksQueryService, 16 | StocksQueryServiceRepository, 17 | ) 18 | -------------------------------------------------------------------------------- /tutorials/stock-wallet/microservices/stocks/src/__main__.py: -------------------------------------------------------------------------------- 1 | from .cli import ( 2 | main, 3 | ) 4 | 5 | if __name__ == "__main__": 6 | main() 7 | -------------------------------------------------------------------------------- /tutorials/stock-wallet/microservices/stocks/src/commands/__init__.py: -------------------------------------------------------------------------------- 1 | from .services import ( 2 | StocksCommandService, 3 | ) 4 | -------------------------------------------------------------------------------- /tutorials/stock-wallet/microservices/stocks/src/queries/__init__.py: -------------------------------------------------------------------------------- 1 | from .repository import ( 2 | StocksQueryServiceRepository, 3 | ) 4 | from .services import ( 5 | StocksQueryService, 6 | ) 7 | -------------------------------------------------------------------------------- /tutorials/stock-wallet/microservices/stocks/src/queries/models.py: -------------------------------------------------------------------------------- 1 | from sqlalchemy.orm import ( 2 | declarative_base, 3 | ) 4 | 5 | Base = declarative_base() 6 | -------------------------------------------------------------------------------- /tutorials/stock-wallet/microservices/stocks/tests/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minos-framework/minos-python/3427fdaed489d3b9330c80ce15d77975e0135b9c/tutorials/stock-wallet/microservices/stocks/tests/__init__.py -------------------------------------------------------------------------------- /tutorials/stock-wallet/microservices/stocks/tests/test_commands/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minos-framework/minos-python/3427fdaed489d3b9330c80ce15d77975e0135b9c/tutorials/stock-wallet/microservices/stocks/tests/test_commands/__init__.py -------------------------------------------------------------------------------- /tutorials/stock-wallet/microservices/stocks/tests/test_queries/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minos-framework/minos-python/3427fdaed489d3b9330c80ce15d77975e0135b9c/tutorials/stock-wallet/microservices/stocks/tests/test_queries/__init__.py -------------------------------------------------------------------------------- /tutorials/stock-wallet/microservices/wallet/.build_docker_compose.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minos-framework/minos-python/3427fdaed489d3b9330c80ce15d77975e0135b9c/tutorials/stock-wallet/microservices/wallet/.build_docker_compose.txt -------------------------------------------------------------------------------- /tutorials/stock-wallet/microservices/wallet/.dockerignore: -------------------------------------------------------------------------------- 1 | .venv 2 | *.lmdb 3 | dist/ 4 | -------------------------------------------------------------------------------- /tutorials/stock-wallet/microservices/wallet/.minos-microservice.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minos-framework/minos-python/3427fdaed489d3b9330c80ce15d77975e0135b9c/tutorials/stock-wallet/microservices/wallet/.minos-microservice.yaml -------------------------------------------------------------------------------- /tutorials/stock-wallet/microservices/wallet/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM ghcr.io/clariteia/minos-microservice:0.1.8 as development 2 | 3 | COPY ./pyproject.toml ./ 4 | RUN poetry install --no-root 5 | COPY . . 6 | CMD ["poetry", "run", "microservice", "start"] 7 | 8 | FROM development as build 9 | RUN poetry export --without-hashes > req.txt && pip wheel -r req.txt --wheel-dir ./dist 10 | RUN poetry build --format wheel 11 | 12 | FROM python:3.9-slim as production 13 | COPY --from=build /microservice/dist/ ./dist 14 | RUN pip install --no-deps ./dist/* 15 | COPY config.yml ./config.yml 16 | ENTRYPOINT ["microservice"] 17 | CMD ["start"] 18 | -------------------------------------------------------------------------------- /tutorials/stock-wallet/microservices/wallet/README.md: -------------------------------------------------------------------------------- 1 | # wallet Microservice 2 | 3 | ## Description 4 | -------------------------------------------------------------------------------- /tutorials/stock-wallet/microservices/wallet/poetry.toml: -------------------------------------------------------------------------------- 1 | [virtualenvs] 2 | in-project = true -------------------------------------------------------------------------------- /tutorials/stock-wallet/microservices/wallet/setup.cfg: -------------------------------------------------------------------------------- 1 | [coverage:run] 2 | source = src 3 | 4 | [coverage:report] 5 | exclude_lines = 6 | pragma: no cover 7 | raise NotImplementedError 8 | if TYPE_CHECKING: 9 | pass 10 | precision = 2 11 | 12 | [flake8] 13 | filename = 14 | ./src/**/*.py, 15 | ./tests/**/*.py, 16 | max-line-length = 120 17 | per-file-ignores = 18 | ./**/__init__.py:F401,W391 19 | 20 | [isort] 21 | known_first_party = src,tests 22 | multi_line_output = 3 23 | include_trailing_comma = True 24 | force_grid_wrap = 1 25 | use_parentheses = True 26 | line_length = 120 27 | -------------------------------------------------------------------------------- /tutorials/stock-wallet/microservices/wallet/src/__init__.py: -------------------------------------------------------------------------------- 1 | __author__ = "" 2 | __email__ = "" 3 | __version__ = "0.1.0" 4 | 5 | from .aggregates import ( 6 | Ticker, 7 | Wallet, 8 | ) 9 | from .cli import ( 10 | main, 11 | ) 12 | from .commands import ( 13 | WalletCommandService, 14 | ) 15 | from .queries import ( 16 | WalletQueryService, 17 | WalletQueryServiceRepository, 18 | ) 19 | -------------------------------------------------------------------------------- /tutorials/stock-wallet/microservices/wallet/src/__main__.py: -------------------------------------------------------------------------------- 1 | from .cli import ( 2 | main, 3 | ) 4 | 5 | if __name__ == "__main__": 6 | main() 7 | -------------------------------------------------------------------------------- /tutorials/stock-wallet/microservices/wallet/src/commands/__init__.py: -------------------------------------------------------------------------------- 1 | from .services import ( 2 | WalletCommandService, 3 | ) 4 | -------------------------------------------------------------------------------- /tutorials/stock-wallet/microservices/wallet/src/queries/__init__.py: -------------------------------------------------------------------------------- 1 | from .repository import ( 2 | WalletQueryServiceRepository, 3 | ) 4 | from .services import ( 5 | WalletQueryService, 6 | ) 7 | -------------------------------------------------------------------------------- /tutorials/stock-wallet/microservices/wallet/tests/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minos-framework/minos-python/3427fdaed489d3b9330c80ce15d77975e0135b9c/tutorials/stock-wallet/microservices/wallet/tests/__init__.py -------------------------------------------------------------------------------- /tutorials/stock-wallet/microservices/wallet/tests/test_commands/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minos-framework/minos-python/3427fdaed489d3b9330c80ce15d77975e0135b9c/tutorials/stock-wallet/microservices/wallet/tests/test_commands/__init__.py -------------------------------------------------------------------------------- /tutorials/stock-wallet/microservices/wallet/tests/test_queries/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minos-framework/minos-python/3427fdaed489d3b9330c80ce15d77975e0135b9c/tutorials/stock-wallet/microservices/wallet/tests/test_queries/__init__.py --------------------------------------------------------------------------------