Dynamo Dao
## Description
This is a simple DynamoDB Dao that can be used to interact with DynamoDB. It is a simple wrapper around the AWS SDK for DynamoDB.
## Installation
```bash
pip install finalsa-dynamo-dao
```
## Usage
```python
from finalsa.dynamo.dao import DynamoDao
# Create a new model and its dao
class MyModelDao(DynamoDao):
id:str
name:str
age:int
created_at:datetime
class MyModelDao(DynamoDao):
PK:str
name:str
age:int
created_at:datetime
ttl:int
# Create a mapper
def my_mapper(item:dict) -> MyModelDao:
return MyModelDao(**item)
# Create a reverse mapper
def my_reverse_mapper(model:MyModelDao) -> dict:
return model.dict()
```
Raw data
{
"_id": null,
"home_page": "https://github.com/finalsa/finalsa-dynamo-dao",
"name": "finalsa-dynamo-dao",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.10",
"maintainer_email": null,
"keywords": "dynamodb",
"author": "Luis Jimenez",
"author_email": "luis@finalsa.com",
"download_url": "https://files.pythonhosted.org/packages/6c/37/5f611e9cc3427981eb79f362b2811ad35427aecfdf597bdb402938ba0ed5/finalsa_dynamo_dao-0.1.0.tar.gz",
"platform": null,
"description": "Dynamo Dao\n\n## Description\n\nThis is a simple DynamoDB Dao that can be used to interact with DynamoDB. It is a simple wrapper around the AWS SDK for DynamoDB.\n\n## Installation\n\n```bash\npip install finalsa-dynamo-dao\n```\n\n## Usage\n\n```python\nfrom finalsa.dynamo.dao import DynamoDao\n\n# Create a new model and its dao\n\nclass MyModelDao(DynamoDao):\n id:str\n name:str\n age:int\n created_at:datetime\n\nclass MyModelDao(DynamoDao):\n PK:str\n name:str\n age:int\n created_at:datetime\n ttl:int\n\n# Create a mapper\ndef my_mapper(item:dict) -> MyModelDao:\n return MyModelDao(**item)\n\n# Create a reverse mapper\n\ndef my_reverse_mapper(model:MyModelDao) -> dict:\n return model.dict()\n\n```\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "An utils package for using dynamodb",
"version": "0.1.0",
"project_urls": {
"Homepage": "https://github.com/finalsa/finalsa-dynamo-dao"
},
"split_keywords": [
"dynamodb"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "a129b965d9c1050fb60a3796c9943556ba8e60cb6afb620b90787ac63d95dfa3",
"md5": "2465c67e7dba49183706b3fdf746a578",
"sha256": "c1efa21b1045e6d51d30985f066667b9d1a0aa18697ee16d19fa1384780b5a52"
},
"downloads": -1,
"filename": "finalsa_dynamo_dao-0.1.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "2465c67e7dba49183706b3fdf746a578",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.10",
"size": 5789,
"upload_time": "2024-04-25T14:42:16",
"upload_time_iso_8601": "2024-04-25T14:42:16.303667Z",
"url": "https://files.pythonhosted.org/packages/a1/29/b965d9c1050fb60a3796c9943556ba8e60cb6afb620b90787ac63d95dfa3/finalsa_dynamo_dao-0.1.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "6c375f611e9cc3427981eb79f362b2811ad35427aecfdf597bdb402938ba0ed5",
"md5": "13712f1b74159eb65e99c804702fbe33",
"sha256": "fd93f76cd9ae1b75f34180445a5f837d54b2e6fd33fd6aa6f21e61c4df8a2319"
},
"downloads": -1,
"filename": "finalsa_dynamo_dao-0.1.0.tar.gz",
"has_sig": false,
"md5_digest": "13712f1b74159eb65e99c804702fbe33",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.10",
"size": 4334,
"upload_time": "2024-04-25T14:42:17",
"upload_time_iso_8601": "2024-04-25T14:42:17.616101Z",
"url": "https://files.pythonhosted.org/packages/6c/37/5f611e9cc3427981eb79f362b2811ad35427aecfdf597bdb402938ba0ed5/finalsa_dynamo_dao-0.1.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-04-25 14:42:17",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "finalsa",
"github_project": "finalsa-dynamo-dao",
"github_not_found": true,
"lcname": "finalsa-dynamo-dao"
}