Code Monkey home page Code Monkey logo

kingdom-python-sdk's Introduction

๐Ÿฐ Kingdom SDK

Library containing the core modules for the kingdom-python-server.

Features

See the changelog to see all the features supported.

Installation

Use the package manager pip to install kingdom-sdk.

pip install kingdom-sdk

You can use poetry as well.

poetry add kingdom-sdk

Usage

from kingdom_sdk.utils import files

orm_files = files.find("orm.py", "/")

Test

To test the database package, you need do it manually, running a migration. Make sure the database is configured before.

cd tests/poc/
alembic revision --autogenerate
alembic upgrade head

The rest, run pytest.

Don't commit the generated revision.

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

License

MIT

kingdom-python-sdk's People

Contributors

williamabreu avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar

kingdom-python-sdk's Issues

Init events on Aggregate in-memory

Use the orm.reconstructor decorator on the events attribute for the Aggregate model to init and load it only on memory, according to the example on the Constructors and Object Initialization section of SQLAlchemy docs:

from sqlalchemy import orm


class MyMappedClass:
    def __init__(self, data):
        self.data = data
        # we need stuff on all instances, but not in the database.
        self.stuff = []

    @orm.reconstructor
    def init_on_load(self):
        self.stuff = []

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.