EaseExcel


NameEaseExcel JSON
Version 1.0.2 PyPI version JSON
download
home_pagehttps://github.com/Vishal-Vashisht/EaseExcel
SummaryPackage to write data from database to excel files
upload_time2024-03-08 15:24:45
maintainer
docs_urlNone
authorVishal Sharma
requires_python>=3.6
licenseMIT
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # EaseExcel
EaseExcel is a Python package designed to facilitate the transfer of data from databases to Excel. It seamlessly integrates with SQLAlchemy, supporting connections to various database types.

# Installation
If you encounter any errors during installation, you may need to install the following packages before trying again:

```bash
pip install SQLAlchemy XlsxWriter
```

# Usage
```python
# Import statments
from sqlalchemy import create_engine
from sqlalchemy import text
import asyncio

from EaseExcel.src.Excel.ease_excel import EaseExcel

```

```python
# Example 1
async def main():
    """
    In this example providing sql alchmey engine and sql query as argument

    These are required argument
    
    """
    engine = create_engine('postgresql+psycopg2://username:password@host:port/database')
   
    query = "select * from posts"

    await EaseExcel(
        sqlalchemy_engine=engine,
        SQL_query=query).build()

asyncio.run(main())

```

```python
# Example 2
async def main():
    """
    In this example providing sql alchmey engine, sql query and filename as argument

    file_name: it is optional argument if filename is not provided file will we created with
    default name.
    
    """
    engine = create_engine('postgresql+psycopg2://username:password@host:port/database')
   
    query = "select * from posts"

    await EaseExcel(
        sqlalchemy_engine=engine,
        SQL_query=query,
        file_name='Posts').build()

asyncio.run(main())

```

```python
# Example 3
async def main():
    """
    In this example providing sql alchmey engine, sql query and filename as argument

    file_name: it is optional argument if filename is not provided file will we created with
    default name.

    file_path: it is also a optional argument if this is not provided file will be create in current directory.
    
    """
    engine = create_engine('postgresql+psycopg2://username:password@host:port/database')
   
    query = "select * from posts"

    await EaseExcel(
        sqlalchemy_engine=engine,
        SQL_query=query,
        file_name='Posts'.
        file_path='<path>').build()

asyncio.run(main())

```

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/Vishal-Vashisht/EaseExcel",
    "name": "EaseExcel",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.6",
    "maintainer_email": "",
    "keywords": "",
    "author": "Vishal Sharma",
    "author_email": "vashisth671@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/c1/b6/f49448b08db72c0712b1817020aa6acf6c2db1d37bb8a0b8612997b1042d/EaseExcel-1.0.2.tar.gz",
    "platform": null,
    "description": "# EaseExcel\r\nEaseExcel is a Python package designed to facilitate the transfer of data from databases to Excel. It seamlessly integrates with SQLAlchemy, supporting connections to various database types.\r\n\r\n# Installation\r\nIf you encounter any errors during installation, you may need to install the following packages before trying again:\r\n\r\n```bash\r\npip install SQLAlchemy XlsxWriter\r\n```\r\n\r\n# Usage\r\n```python\r\n# Import statments\r\nfrom sqlalchemy import create_engine\r\nfrom sqlalchemy import text\r\nimport asyncio\r\n\r\nfrom EaseExcel.src.Excel.ease_excel import EaseExcel\r\n\r\n```\r\n\r\n```python\r\n# Example 1\r\nasync def main():\r\n    \"\"\"\r\n    In this example providing sql alchmey engine and sql query as argument\r\n\r\n    These are required argument\r\n    \r\n    \"\"\"\r\n    engine = create_engine('postgresql+psycopg2://username:password@host:port/database')\r\n   \r\n    query = \"select * from posts\"\r\n\r\n    await EaseExcel(\r\n        sqlalchemy_engine=engine,\r\n        SQL_query=query).build()\r\n\r\nasyncio.run(main())\r\n\r\n```\r\n\r\n```python\r\n# Example 2\r\nasync def main():\r\n    \"\"\"\r\n    In this example providing sql alchmey engine, sql query and filename as argument\r\n\r\n    file_name: it is optional argument if filename is not provided file will we created with\r\n    default name.\r\n    \r\n    \"\"\"\r\n    engine = create_engine('postgresql+psycopg2://username:password@host:port/database')\r\n   \r\n    query = \"select * from posts\"\r\n\r\n    await EaseExcel(\r\n        sqlalchemy_engine=engine,\r\n        SQL_query=query,\r\n        file_name='Posts').build()\r\n\r\nasyncio.run(main())\r\n\r\n```\r\n\r\n```python\r\n# Example 3\r\nasync def main():\r\n    \"\"\"\r\n    In this example providing sql alchmey engine, sql query and filename as argument\r\n\r\n    file_name: it is optional argument if filename is not provided file will we created with\r\n    default name.\r\n\r\n    file_path: it is also a optional argument if this is not provided file will be create in current directory.\r\n    \r\n    \"\"\"\r\n    engine = create_engine('postgresql+psycopg2://username:password@host:port/database')\r\n   \r\n    query = \"select * from posts\"\r\n\r\n    await EaseExcel(\r\n        sqlalchemy_engine=engine,\r\n        SQL_query=query,\r\n        file_name='Posts'.\r\n        file_path='<path>').build()\r\n\r\nasyncio.run(main())\r\n\r\n```\r\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Package to write data from database to excel files",
    "version": "1.0.2",
    "project_urls": {
        "Homepage": "https://github.com/Vishal-Vashisht/EaseExcel"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "fc594bc23cddf98924f1cc4e6ddf139e254bb273d72abf661fd31aebdffab93e",
                "md5": "5e26905a642f7f0ef9d1940d1fc9d674",
                "sha256": "3d85a887e68de5d3b41b1e875ac298e1677139696cbcd36bf001be096bd3f127"
            },
            "downloads": -1,
            "filename": "EaseExcel-1.0.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "5e26905a642f7f0ef9d1940d1fc9d674",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.6",
            "size": 4351,
            "upload_time": "2024-03-08T15:24:44",
            "upload_time_iso_8601": "2024-03-08T15:24:44.135505Z",
            "url": "https://files.pythonhosted.org/packages/fc/59/4bc23cddf98924f1cc4e6ddf139e254bb273d72abf661fd31aebdffab93e/EaseExcel-1.0.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "c1b6f49448b08db72c0712b1817020aa6acf6c2db1d37bb8a0b8612997b1042d",
                "md5": "92b1380f6ecd7b3889d689cae9f304c5",
                "sha256": "7d45d26d05c148b44b7022350529764cf96bbef42696aaff51ee5f20ceceafd9"
            },
            "downloads": -1,
            "filename": "EaseExcel-1.0.2.tar.gz",
            "has_sig": false,
            "md5_digest": "92b1380f6ecd7b3889d689cae9f304c5",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.6",
            "size": 3924,
            "upload_time": "2024-03-08T15:24:45",
            "upload_time_iso_8601": "2024-03-08T15:24:45.989883Z",
            "url": "https://files.pythonhosted.org/packages/c1/b6/f49448b08db72c0712b1817020aa6acf6c2db1d37bb8a0b8612997b1042d/EaseExcel-1.0.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-03-08 15:24:45",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "Vishal-Vashisht",
    "github_project": "EaseExcel",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "easeexcel"
}
        
Elapsed time: 0.20988s