Skip to main content

Simple-entity

CI Simeple Entity Type for DDD development.

Install

pip install -U simple-entity

Use

class Activity(Entity):
    title: str = "activity"
    timeCreate: datetime = None
    timeStart: datetime = None
    timeEnd: datetime = None
    timeEdit: datetime = None

    def update(self, fields: List[str]):
        self.timeEdit = datetime.now()
        return


activity = Activity(
        _id="0",
        title="act0",
        timeCreate=datetime(2020, 1, 1),
        timeStart=datetime(2020, 1, 1),
        timeEnd=datetime(2020, 1, 10),
    )
act_dict = {
    "_id": "0",
    "timeCreate": datetime(2020, 1, 1, 0, 0),
    "timeStart": datetime(2020, 1, 1, 0, 0),
    "timeEdit": None,
    "timeEnd": datetime(2020, 1, 10, 0, 0),
    "title": "act0",
}

assert activity.to_dict() == act_dict
assert Activity.from_dict(act_dict) == activity

Metadata

Release files for simple-entity 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for simple-entity 0.1.1
File Size Uploaded Provenance Actions
simple-entity-0.1.1.tar.gz 3.1 kB Without provenance Details for simple-entity-0.1.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for simple-entity 0.1.1
File Interpreter ABI Platform Actions
simple_entity-0.1.1-py3-none-any.whl Python 3 none any Details for simple_entity-0.1.1-py3-none-any.whl

Total release size: 5.8 kB

Release files / simple-entity-0.1.1.tar.gz

Download URL simple-entity-0.1.1.tar.gz
Size 3.1 kB
Tags Source
SHA-256 checksum
How to use checksums
8af8ae95f959b01dea3ed2516d236c459d23f7c11b037505eda6702428432f09
BLAKE2b-256 checksum
How to use checksums
4609293570a177c984e631e79edf7618f86e66127a3390ca3d7037e7995cf033
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.3 CPython/3.8.6 Linux/5.4.0-1026-azure

Release files / simple_entity-0.1.1-py3-none-any.whl

Download URL simple_entity-0.1.1-py3-none-any.whl
Size 2.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
472109e2c52ad941c7c81b1e391ad397e46f5088fb84abd2c79b23343eef5619
BLAKE2b-256 checksum
How to use checksums
c7d49c28ddf0cd8427cf26031a0e19be3537810a6f6e38c05fac7e234e778b74
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.3 CPython/3.8.6 Linux/5.4.0-1026-azure

Security for simple-entity 0.1.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page