Name | dfdb JSON |
Version |
0.1.9
JSON |
| download |
home_page | |
Summary | Pandas-like interface for manipulating SQL databases. |
upload_time | 2023-05-05 22:25:23 |
maintainer | |
docs_url | None |
author | Ho Yin Chau |
requires_python | >=3.9 |
license | MIT License Copyright (c) 2023 hchau630 Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
keywords |
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# dfdb
Pandas-like interface for manipulating SQL databases
## Install
`pip install dfdb`
## Overview
This package is a lightweight wrapper around SQLalchemy. As such, it can be used with a variety of database backends, although as of now the package has only been tested with SQLite.
The `dfdb.Database` class provides a dict-like interface of manipulating tables in a SQL database. For example, if we create a `Database` object like
```db = dfdb.Database(filename='data.db', drivername='sqlite')```
Then we can perform operations on a table called `df` in `data.db` by calling, for example
```db['df'].groupby('col1').agg(mean=('col2', 'mean')).fetch()```
`db['df']` is a `dfdb.DataFrame` object that behaves almost identically as a `pandas.DataFrame`. The only difference is that you need to call `.fetch()`, which establishes a connection to the database and performs the corresponding SQL query.
Adding rows to the table is as simple as
```db['df'].append({'col1': 1, 'col2': 2})```
More detailed documentation to follow in the future.
Raw data
{
"_id": null,
"home_page": "",
"name": "dfdb",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.9",
"maintainer_email": "",
"keywords": "",
"author": "Ho Yin Chau",
"author_email": "",
"download_url": "https://files.pythonhosted.org/packages/1f/89/df271baa6c32eeb6736c0b43dff864f68fb20791e545aab0262e1b1f7ce6/dfdb-0.1.9.tar.gz",
"platform": null,
"description": "# dfdb\nPandas-like interface for manipulating SQL databases\n\n## Install\n`pip install dfdb`\n\n## Overview\nThis package is a lightweight wrapper around SQLalchemy. As such, it can be used with a variety of database backends, although as of now the package has only been tested with SQLite.\n\nThe `dfdb.Database` class provides a dict-like interface of manipulating tables in a SQL database. For example, if we create a `Database` object like\n\n```db = dfdb.Database(filename='data.db', drivername='sqlite')```\n\nThen we can perform operations on a table called `df` in `data.db` by calling, for example\n\n```db['df'].groupby('col1').agg(mean=('col2', 'mean')).fetch()```\n\n`db['df']` is a `dfdb.DataFrame` object that behaves almost identically as a `pandas.DataFrame`. The only difference is that you need to call `.fetch()`, which establishes a connection to the database and performs the corresponding SQL query.\n\nAdding rows to the table is as simple as\n\n```db['df'].append({'col1': 1, 'col2': 2})```\n\nMore detailed documentation to follow in the future.\n",
"bugtrack_url": null,
"license": "MIT License Copyright (c) 2023 hchau630 Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ",
"summary": "Pandas-like interface for manipulating SQL databases.",
"version": "0.1.9",
"project_urls": {
"repository": "https://github.com/hchau630/dfdb"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "db675b97d0b6e42b7811593d438f1e2cff247f979760c0334c799dc8ba4d092d",
"md5": "4e13c239e1ab16bea8e326b33e6f38ea",
"sha256": "f9dcae7b441072987bfd5b799627bc113126406939abd34eb72b9d666e888890"
},
"downloads": -1,
"filename": "dfdb-0.1.9-py3-none-any.whl",
"has_sig": false,
"md5_digest": "4e13c239e1ab16bea8e326b33e6f38ea",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.9",
"size": 25208,
"upload_time": "2023-05-05T22:25:22",
"upload_time_iso_8601": "2023-05-05T22:25:22.102191Z",
"url": "https://files.pythonhosted.org/packages/db/67/5b97d0b6e42b7811593d438f1e2cff247f979760c0334c799dc8ba4d092d/dfdb-0.1.9-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "1f89df271baa6c32eeb6736c0b43dff864f68fb20791e545aab0262e1b1f7ce6",
"md5": "583aedc08abc5e28f3dae5486e69da02",
"sha256": "c9bc71b894b0b75e8461d17e14cbca217c916b12e6ff152c6b8d30e5f5b199d8"
},
"downloads": -1,
"filename": "dfdb-0.1.9.tar.gz",
"has_sig": false,
"md5_digest": "583aedc08abc5e28f3dae5486e69da02",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.9",
"size": 28979,
"upload_time": "2023-05-05T22:25:23",
"upload_time_iso_8601": "2023-05-05T22:25:23.801647Z",
"url": "https://files.pythonhosted.org/packages/1f/89/df271baa6c32eeb6736c0b43dff864f68fb20791e545aab0262e1b1f7ce6/dfdb-0.1.9.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-05-05 22:25:23",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "hchau630",
"github_project": "dfdb",
"github_not_found": true,
"lcname": "dfdb"
}