dynamodm


Namedynamodm JSON
Version 0.0.4 PyPI version JSON
download
home_page
SummaryDynamoDB ODM for Python
upload_time2023-12-31 02:54:43
maintainer
docs_urlNone
authorOscar Bahamonde
requires_python>=3.8,<4.0
license
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # DynamoDB Object Document Mapper (ODM) for Python

## Installation

```bash
pip install dynamodm
```

## Usage

```python

from dynamodm import DynaModel, Field

class User(DynaModel):
	sub: str = Field(pk=True)
	name: str = Field(sk=True)
	age: int

user = User(sub="user", name="John Doe", age=42)

async def main():
	await user.put()
	# User(sub='user', name='John Doe', age=42)
	await User.get(pk="user", sk="John Doe")
	# User(sub='user', name='John Doe', age=42)
	await User.query(pk="user", sk="John Doe",operator="begins_with")
	# [User(sub='user', name='John Doe', age=42)]
	await User.delete(pk="user", sk="John Doe")
	# None
	
```

## Features

- [x] Type hints
- [x] Automatic schema generation
- [x] Automatic table creation
- [x] Automatic table updates
- [x] Automatic table deletion

            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "dynamodm",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.8,<4.0",
    "maintainer_email": "",
    "keywords": "",
    "author": "Oscar Bahamonde",
    "author_email": "o.bahamonde@globant.com",
    "download_url": "https://files.pythonhosted.org/packages/7f/30/c98502a4d88e354d8abb5f3a57483bb517a6e530d5896513441b257f4d2d/dynamodm-0.0.4.tar.gz",
    "platform": null,
    "description": "# DynamoDB Object Document Mapper (ODM) for Python\n\n## Installation\n\n```bash\npip install dynamodm\n```\n\n## Usage\n\n```python\n\nfrom dynamodm import DynaModel, Field\n\nclass User(DynaModel):\n\tsub: str = Field(pk=True)\n\tname: str = Field(sk=True)\n\tage: int\n\nuser = User(sub=\"user\", name=\"John Doe\", age=42)\n\nasync def main():\n\tawait user.put()\n\t# User(sub='user', name='John Doe', age=42)\n\tawait User.get(pk=\"user\", sk=\"John Doe\")\n\t# User(sub='user', name='John Doe', age=42)\n\tawait User.query(pk=\"user\", sk=\"John Doe\",operator=\"begins_with\")\n\t# [User(sub='user', name='John Doe', age=42)]\n\tawait User.delete(pk=\"user\", sk=\"John Doe\")\n\t# None\n\t\n```\n\n## Features\n\n- [x] Type hints\n- [x] Automatic schema generation\n- [x] Automatic table creation\n- [x] Automatic table updates\n- [x] Automatic table deletion\n",
    "bugtrack_url": null,
    "license": "",
    "summary": "DynamoDB ODM for Python",
    "version": "0.0.4",
    "project_urls": null,
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "f4c01d54fba7ee15098a251c5733bd56f3b80088f3cd410da993649ebebe1ac0",
                "md5": "dbb5b2626687ed4b724397f42b03d839",
                "sha256": "a298ef7c0cd3429c8676b3f8d6b7b7e25253e13e70c4e155073ea0f6cfdacc58"
            },
            "downloads": -1,
            "filename": "dynamodm-0.0.4-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "dbb5b2626687ed4b724397f42b03d839",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8,<4.0",
            "size": 10494,
            "upload_time": "2023-12-31T02:54:41",
            "upload_time_iso_8601": "2023-12-31T02:54:41.635114Z",
            "url": "https://files.pythonhosted.org/packages/f4/c0/1d54fba7ee15098a251c5733bd56f3b80088f3cd410da993649ebebe1ac0/dynamodm-0.0.4-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "7f30c98502a4d88e354d8abb5f3a57483bb517a6e530d5896513441b257f4d2d",
                "md5": "94800a23887c9cadc7d2582c06177aae",
                "sha256": "8b2840d2e143f43ee5afff13b0d56b1a2514118d3d385e0c7314eee6b9832395"
            },
            "downloads": -1,
            "filename": "dynamodm-0.0.4.tar.gz",
            "has_sig": false,
            "md5_digest": "94800a23887c9cadc7d2582c06177aae",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8,<4.0",
            "size": 8806,
            "upload_time": "2023-12-31T02:54:43",
            "upload_time_iso_8601": "2023-12-31T02:54:43.417956Z",
            "url": "https://files.pythonhosted.org/packages/7f/30/c98502a4d88e354d8abb5f3a57483bb517a6e530d5896513441b257f4d2d/dynamodm-0.0.4.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-12-31 02:54:43",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "dynamodm"
}
        
Elapsed time: 0.19799s