{ "info": { "author": "Mike Alfare", "author_email": "alfare@gmail.com", "bugtrack_url": null, "classifiers": [ "License :: OSI Approved :: MIT License", "Programming Language :: Python :: 3" ], "description": "# BCP\n\n< badges will go here >\n\n**This is a python utility that allows users to import/export data to/from a database.**\n\n---\n\n# Overview\n\nThis library began as a wrapper around SQL Server's BCP utility. It makes some assumptions\nabout parameters to simplify the interface and allow the user to work natively in python.\nThough it currently supports MSSQL, there are plans to extend support to other database dialects.\n\n# Requirements\n\n- Python 3.6+\n\nThis library purposely requires no python packages outside of the standard library, beyond testing and documentation\nneeds. The intention is to maintain this status. However, you will need to have the appropriate command line utilities\ninstalled for the specific database dialects with which you'll interact. For example, if your database is a MS SQL\nSERVER instance, you'll need BCP installed. Consult the table below for further documentation, including download files\nand instructions.\n\n| RDBMS | Utility | Documentation / Installation |\n|:--------------|:--------|:-------------------------------------------------------|\n| MS SQL Server | BCP | https://docs.microsoft.com/en-us/sql/tools/bcp-utility |\n\n# Installation\n\nThis library is still in development. So you'll have to build it from\nsource in the meantime. I'll soon get around to publishing it on pypi, \nin which case you'll be able to install it using `pip`\n\n pip install bcp\n\n# Examples\n\nImport data:\n```python\nfrom bcp import BCP, Connection, DataFile\n\nconn = Connection(host='HOST', driver='mssql', username='USER', password='PASSWORD')\nmy_bcp = BCP(conn)\nfile = DataFile(file_path='path/to/file.csv', delimiter=',')\nmy_bcp.load(file, 'table_name')\n```\n\nExport data:\n```python\nfrom bcp import BCP, Connection\n\nconn = Connection(host='HOST', driver='mssql', username='USER', password='PASSWORD')\nmy_bcp = BCP(conn)\nfile = my_bcp.dump('select * from sys.tables')\nprint(file) # %USERPROFILE%/bcp/data/.tsv\n```\n\n# Full Documentation\n\nFor the full documentation, please visit: https://bcp.readthedocs.io/en/latest/\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/mikealfare/bcp", "keywords": "BCP SQLServer MSSQL", "license": "", "maintainer": "", "maintainer_email": "", "name": "bcp", "package_url": "https://pypi.org/project/bcp/", "platform": "", "project_url": "https://pypi.org/project/bcp/", "project_urls": { "Homepage": "https://github.com/mikealfare/bcp" }, "release_url": "https://pypi.org/project/bcp/0.2.1/", "requires_dist": [ "sphinx; extra == \"doc\"", "sphinx-autodoc-typehints; extra == \"doc\"", "sphinx_rtd_theme; extra == \"doc\"", "pytest; extra == \"test\"", "pytest-cov; extra == \"test\"", "pytest-freezegun; extra == \"test\"" ], "requires_python": ">=3.6", "summary": "This is a python utility that allows users to import/export data to/from a database.", "version": "0.2.1" }, "last_serial": 5680071, "releases": { "0.2.1": [ { "comment_text": "", "digests": { "md5": "95885c8843e1374f546a6fb409c64b52", "sha256": "4a91b0fbd2852a7d464816b7f860c47a8cb0513d8ea74edf35a9dc16bb665ed1" }, "downloads": -1, "filename": "bcp-0.2.1-py3-none-any.whl", "has_sig": false, "md5_digest": "95885c8843e1374f546a6fb409c64b52", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6", "size": 24007, "upload_time": "2019-08-15T01:39:54", "url": "https://files.pythonhosted.org/packages/e5/6d/7c469322e3226515f227e6c1df2d7199351959f6400f59b78e74fcdcc695/bcp-0.2.1-py3-none-any.whl" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "95885c8843e1374f546a6fb409c64b52", "sha256": "4a91b0fbd2852a7d464816b7f860c47a8cb0513d8ea74edf35a9dc16bb665ed1" }, "downloads": -1, "filename": "bcp-0.2.1-py3-none-any.whl", "has_sig": false, "md5_digest": "95885c8843e1374f546a6fb409c64b52", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6", "size": 24007, "upload_time": "2019-08-15T01:39:54", "url": "https://files.pythonhosted.org/packages/e5/6d/7c469322e3226515f227e6c1df2d7199351959f6400f59b78e74fcdcc695/bcp-0.2.1-py3-none-any.whl" } ] }