Name | sqlalchemy_upsert JSON |
Version |
0.1.0
JSON |
| download |
home_page | None |
Summary | Upsert helper for PostgreSQL using SQLAlchemy. |
upload_time | 2025-07-17 17:36:41 |
maintainer | None |
docs_url | None |
author | Joao Brito |
requires_python | >=3.9 |
license | MIT |
keywords |
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# sqlalchemy-upsert
sqlalchemy-upsert is a Python package designed for efficiently upserting data from CSV files into PostgreSQL databases and dumping tables from Microsoft SQL Server (MSSQL) into CSV format. This package simplifies the process of data migration and synchronization between different database systems.
## Features
- Upsert data from CSV files into PostgreSQL.
- Dump tables from MSSQL to CSV files.
- Support for handling various data types and ensuring data integrity during upserts.
- Multi-threaded processing for improved performance.
## Installation
To install the package, you can use Poetry. First, ensure you have Poetry installed. Then, run the following command:
```bash
poetry install
```
This will install all the necessary dependencies specified in the `pyproject.toml` file.
## Usage
To use the package, you can run the main script located in `src/sqlalchemy_upsert/main.py`. Ensure that your environment variables for database connections are set correctly.
```bash
python src/sqlalchemy_upsert/main.py
```
### Environment Variables
The following environment variables need to be set for the database connections:
- `PGSQL_HOST`: Hostname for the PostgreSQL database.
- `PGSQL_PORT`: Port for the PostgreSQL database (default is 5432).
- `PGSQL_USER`: Username for the PostgreSQL database.
- `PGSQL_PASS`: Password for the PostgreSQL database.
- `PGSQL_NAME`: Name of the PostgreSQL database.
- `MSSQL_HOST`: Hostname for the MSSQL database.
- `MSSQL_PORT`: Port for the MSSQL database (default is 1433).
- `MSSQL_USER`: Username for the MSSQL database.
- `MSSQL_PASS`: Password for the MSSQL database.
- `MSSQL_DATABASE`: Name of the MSSQL database.
## Contributing
Contributions are welcome! Please feel free to submit a pull request or open an issue for any enhancements or bug fixes.
## License
This project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.
Raw data
{
"_id": null,
"home_page": null,
"name": "sqlalchemy_upsert",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.9",
"maintainer_email": null,
"keywords": null,
"author": "Joao Brito",
"author_email": "machado000@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/78/91/44a15d9e1027a7fa29a6b1f7d43a161e64de52fe676ce9060a86abb55b4c/sqlalchemy_upsert-0.1.0.tar.gz",
"platform": null,
"description": "# sqlalchemy-upsert\n\nsqlalchemy-upsert is a Python package designed for efficiently upserting data from CSV files into PostgreSQL databases and dumping tables from Microsoft SQL Server (MSSQL) into CSV format. This package simplifies the process of data migration and synchronization between different database systems.\n\n## Features\n\n- Upsert data from CSV files into PostgreSQL.\n- Dump tables from MSSQL to CSV files.\n- Support for handling various data types and ensuring data integrity during upserts.\n- Multi-threaded processing for improved performance.\n\n## Installation\n\nTo install the package, you can use Poetry. First, ensure you have Poetry installed. Then, run the following command:\n\n```bash\npoetry install\n```\n\nThis will install all the necessary dependencies specified in the `pyproject.toml` file.\n\n## Usage\n\nTo use the package, you can run the main script located in `src/sqlalchemy_upsert/main.py`. Ensure that your environment variables for database connections are set correctly.\n\n```bash\npython src/sqlalchemy_upsert/main.py\n```\n\n### Environment Variables\n\nThe following environment variables need to be set for the database connections:\n\n- `PGSQL_HOST`: Hostname for the PostgreSQL database.\n- `PGSQL_PORT`: Port for the PostgreSQL database (default is 5432).\n- `PGSQL_USER`: Username for the PostgreSQL database.\n- `PGSQL_PASS`: Password for the PostgreSQL database.\n- `PGSQL_NAME`: Name of the PostgreSQL database.\n- `MSSQL_HOST`: Hostname for the MSSQL database.\n- `MSSQL_PORT`: Port for the MSSQL database (default is 1433).\n- `MSSQL_USER`: Username for the MSSQL database.\n- `MSSQL_PASS`: Password for the MSSQL database.\n- `MSSQL_DATABASE`: Name of the MSSQL database.\n\n## Contributing\n\nContributions are welcome! Please feel free to submit a pull request or open an issue for any enhancements or bug fixes.\n\n## License\n\nThis project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.",
"bugtrack_url": null,
"license": "MIT",
"summary": "Upsert helper for PostgreSQL using SQLAlchemy.",
"version": "0.1.0",
"project_urls": null,
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "78eb3e3305b2bafbc47e2d2b5f9e324abab24f23746822515bdff2d477f649c9",
"md5": "97c7440f2b6ea246f72f74c2cfec6d5e",
"sha256": "977d19b1f3d8d0d751bc8c6e6e45cacad2fb3868f2e0e384c24cb294add171aa"
},
"downloads": -1,
"filename": "sqlalchemy_upsert-0.1.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "97c7440f2b6ea246f72f74c2cfec6d5e",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.9",
"size": 7790,
"upload_time": "2025-07-17T17:36:40",
"upload_time_iso_8601": "2025-07-17T17:36:40.563217Z",
"url": "https://files.pythonhosted.org/packages/78/eb/3e3305b2bafbc47e2d2b5f9e324abab24f23746822515bdff2d477f649c9/sqlalchemy_upsert-0.1.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "789144a15d9e1027a7fa29a6b1f7d43a161e64de52fe676ce9060a86abb55b4c",
"md5": "60ca0a6ad6f6114b93d1f444ab0042cc",
"sha256": "d13ee2e5ce53e9a909c43dce446f285cf5c40afc0a5dda000d36020c2350f68a"
},
"downloads": -1,
"filename": "sqlalchemy_upsert-0.1.0.tar.gz",
"has_sig": false,
"md5_digest": "60ca0a6ad6f6114b93d1f444ab0042cc",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.9",
"size": 6672,
"upload_time": "2025-07-17T17:36:41",
"upload_time_iso_8601": "2025-07-17T17:36:41.937615Z",
"url": "https://files.pythonhosted.org/packages/78/91/44a15d9e1027a7fa29a6b1f7d43a161e64de52fe676ce9060a86abb55b4c/sqlalchemy_upsert-0.1.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-07-17 17:36:41",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "sqlalchemy_upsert"
}