{ "info": { "author": "Rafael Izidoro", "author_email": "izidoro.rafa@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", "Topic :: Utilities" ], "description": "# Camus\n**Camus is a raw SQL library enabling an ease integration with the new [Aurora Serverless Data API](\"https://aws.amazon.com/blogs/aws/new-data-api-for-amazon-aurora-serverless/\"). It is a fork of the powerful [Records](\"https://github.com/kennethreitz/records\") library.**\n\n![Camus Aurora Execution](https://raw.githubusercontent.com/rizidoro/camus/master/camus.png)\n## Instalation\n\nThe recommended installation method is `pipenv`:\n\n```shell\n$ pipenv install camus\n```\n\n## Basic Usage\n\nFirst you need to have an Aurora cluster ARN and a Secret ARN. If don't have one yet, just follow the [Data API Getting Started Guide](\"https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/data-api.html\").\n\nWith that in hands, let's drop some query to our database:\n\n```python\nimport camus\n\ndb = camus.Database(\n resource_arn=\"arn:aws:rds:us-east-1:123456789012:cluster:your-cluster-name\",\n secret_arn=\"arn:aws:secretsmanager:us-east-1:123456789012:secret:your-secret-name-ByH87J\",\n dbname=\"mydb\",\n)\n\nrows = db.query(\"SELECT * FROM users\")\n```\n\nYou can grab one row at time (like in Records library)\n\n```python\n>>> rows[0]\n\n```\n\nOr iterate over them:\n\n```python\n for r in rows:\n print(r.name, r.email)\n```\n\nLike mentioned before, Camus is a fork of the Records library, so almost all access pattern are equal:\n\n```python\n row.email\n row['email']\n row[3]\n```\n\nOther options include `rows.as_dict()` and `rows.as_dict(ordered=True)`\n\n\n## Transactions\n\nData API transactions are supported by Camus:\n\n```python\nwith db.transaction() as txid:\n db.query(\"INSERT INTO users (name, email) VALUES (:name, :email)\", name=\"Rafael\", email=\"rafael@email.com\")\n db.query(\"UPDATE posts SET title = :title WHERE id = :id\", title=\"New Title\", id=999)\n```\n\nIf any exception is raised when executing any of the queries, a rollback is performed automatically.\n\n## That's all folks\nThanks for the awesome @kennethreitz for providing his knowledge on the excelent Records library and\nall the talks he has given over the years!\n\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/rizidoro/camus", "keywords": "", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "camus", "package_url": "https://pypi.org/project/camus/", "platform": "", "project_url": "https://pypi.org/project/camus/", "project_urls": { "Homepage": "https://github.com/rizidoro/camus" }, "release_url": "https://pypi.org/project/camus/0.3.0/", "requires_dist": [ "boto3" ], "requires_python": "", "summary": "A Records like database API that works with Aurora Serverless Data API", "version": "0.3.0" }, "last_serial": 5873974, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "3034d6d024aa01445bbc3b30b198c410", "sha256": "326e98830d62284505c62493b1f82faa132c72b2f9ad909fdd34a9d39f48730c" }, "downloads": -1, "filename": "camus-0.0.1-py3-none-any.whl", "has_sig": false, "md5_digest": "3034d6d024aa01445bbc3b30b198c410", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 2056, "upload_time": "2019-07-23T21:40:37", "url": "https://files.pythonhosted.org/packages/fb/e9/32f978a2d2ee86d3e42099fa714ed9a1ff86a16ad464d01fbf6a96a028e5/camus-0.0.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "482eca7e36805675ce61fb163dcf6d24", "sha256": "10eca038f74614ca7651ceaf4c7c559f45aa04a13ae88be11293482b1fb7d630" }, "downloads": -1, "filename": "camus-0.0.1.tar.gz", "has_sig": false, "md5_digest": "482eca7e36805675ce61fb163dcf6d24", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 1140, "upload_time": "2019-07-23T21:40:39", "url": "https://files.pythonhosted.org/packages/1e/c1/df34734509b07dfed5fa1bd2880e866d2c8122c47b8386bf3a21a55f85d3/camus-0.0.1.tar.gz" } ], "0.0.3": [ { "comment_text": "", "digests": { "md5": "a9c3feea7e9ba661d21353bc63dd389c", "sha256": "07d2a4973942757a3e24efa49aefda66f656238ef277289fb8986eecca24a2db" }, "downloads": -1, "filename": "camus-0.0.3-py3-none-any.whl", "has_sig": false, "md5_digest": "a9c3feea7e9ba661d21353bc63dd389c", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 4896, "upload_time": "2019-08-05T18:13:14", "url": "https://files.pythonhosted.org/packages/34/ea/3c09292271319aedc2d69c90ac4f54fe30c33bec640d809fe5aac094adca/camus-0.0.3-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "e148f339a07eb8188c02ab8a202bceb5", "sha256": "39e22403d21d411416e861be204cc669a0c63218f19fd73a559dd61f75a3c9e5" }, "downloads": -1, "filename": "camus-0.0.3.tar.gz", "has_sig": false, "md5_digest": "e148f339a07eb8188c02ab8a202bceb5", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3525, "upload_time": "2019-08-05T18:13:17", "url": "https://files.pythonhosted.org/packages/8d/2e/66f5b67b7ead4355fbd0921d0e137fd4740466ac03b2b05c47f7f18924cb/camus-0.0.3.tar.gz" } ], "0.1.0": [ { "comment_text": "", "digests": { "md5": "c258761547bd557b0d10e433d41aff45", "sha256": "f3555edd9048e63b139490e73459f999cb279c5ba556df925b3471eebde2485a" }, "downloads": -1, "filename": "camus-0.1.0-py3-none-any.whl", "has_sig": false, "md5_digest": "c258761547bd557b0d10e433d41aff45", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 4896, "upload_time": "2019-08-05T18:13:16", "url": "https://files.pythonhosted.org/packages/1a/9c/0629463f50a48487d9e669a42415e2bfe90ccee1d1f158fcb193b7b33d17/camus-0.1.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "b1c16bfcdbc93618d41104668798a3eb", "sha256": "7670085499a820fced9c63e1264d837383bc1494587d5e06dcb3c10001cc2fe1" }, "downloads": -1, "filename": "camus-0.1.0.tar.gz", "has_sig": false, "md5_digest": "b1c16bfcdbc93618d41104668798a3eb", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3519, "upload_time": "2019-08-05T18:13:19", "url": "https://files.pythonhosted.org/packages/35/cd/2c3dc03ae560a32c44078028524a8db2e3ac782c8d85dde3662a9ee894aa/camus-0.1.0.tar.gz" } ], "0.2.0": [ { "comment_text": "", "digests": { "md5": "428c7144bf4094d94b9f0219af474333", "sha256": "4497842db129f632500e455413f79a44d75d580b5b2ad356839f88c682a00330" }, "downloads": -1, "filename": "camus-0.2.0-py3-none-any.whl", "has_sig": false, "md5_digest": "428c7144bf4094d94b9f0219af474333", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 5521, "upload_time": "2019-08-27T19:10:49", "url": "https://files.pythonhosted.org/packages/32/6d/ed338f9d6eb7aea20052c3d016f56d7f6df4586f04804f4f1bdc5d35a5a5/camus-0.2.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "743ec20652125a7d3df92c42f486a045", "sha256": "6d32db2d94e1464e1b5d37495ec4ac78a9842fd566b14ea91dd7e83dbff72490" }, "downloads": -1, "filename": "camus-0.2.0.tar.gz", "has_sig": false, "md5_digest": "743ec20652125a7d3df92c42f486a045", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4644, "upload_time": "2019-08-27T19:10:51", "url": "https://files.pythonhosted.org/packages/bc/63/c0d5891141f0ee5cca38dc711f814d9b6cd2c8196b7aa14d60d23b3413d6/camus-0.2.0.tar.gz" } ], "0.3.0": [ { "comment_text": "", "digests": { "md5": "f9c8b9cff9935682a80e45e360ba36c6", "sha256": "fb71ec5b16392a722b8af8176f89c5e397e809148ff589a5e664d798a4d2f5f4" }, "downloads": -1, "filename": "camus-0.3.0-py3-none-any.whl", "has_sig": false, "md5_digest": "f9c8b9cff9935682a80e45e360ba36c6", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 5679, "upload_time": "2019-09-23T14:38:36", "url": "https://files.pythonhosted.org/packages/b8/21/3174df5fc8696511ff1159379659902add43f9d1dc3a47777f111e52a6f4/camus-0.3.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "9aa1106c77ff75e42dc0f2395a14dd99", "sha256": "63e099583ce051c901b94e38dc0913fd3718cb6b5d2d0865b25a0ae49282dca3" }, "downloads": -1, "filename": "camus-0.3.0.tar.gz", "has_sig": false, "md5_digest": "9aa1106c77ff75e42dc0f2395a14dd99", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4806, "upload_time": "2019-09-23T14:38:39", "url": "https://files.pythonhosted.org/packages/e4/7d/e5dbe23fab39eacb2021313861300b973ca1e8d2c9eeb528a8b250ef3310/camus-0.3.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "f9c8b9cff9935682a80e45e360ba36c6", "sha256": "fb71ec5b16392a722b8af8176f89c5e397e809148ff589a5e664d798a4d2f5f4" }, "downloads": -1, "filename": "camus-0.3.0-py3-none-any.whl", "has_sig": false, "md5_digest": "f9c8b9cff9935682a80e45e360ba36c6", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 5679, "upload_time": "2019-09-23T14:38:36", "url": "https://files.pythonhosted.org/packages/b8/21/3174df5fc8696511ff1159379659902add43f9d1dc3a47777f111e52a6f4/camus-0.3.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "9aa1106c77ff75e42dc0f2395a14dd99", "sha256": "63e099583ce051c901b94e38dc0913fd3718cb6b5d2d0865b25a0ae49282dca3" }, "downloads": -1, "filename": "camus-0.3.0.tar.gz", "has_sig": false, "md5_digest": "9aa1106c77ff75e42dc0f2395a14dd99", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4806, "upload_time": "2019-09-23T14:38:39", "url": "https://files.pythonhosted.org/packages/e4/7d/e5dbe23fab39eacb2021313861300b973ca1e8d2c9eeb528a8b250ef3310/camus-0.3.0.tar.gz" } ] }