{"id":19946105,"url":"https://github.com/quantco/sqlcompyre","last_synced_at":"2025-05-03T16:32:50.593Z","repository":{"id":252840805,"uuid":"833734680","full_name":"Quantco/sqlcompyre","owner":"Quantco","description":"Python package for comparing SQL tables and databases.","archived":false,"fork":false,"pushed_at":"2025-04-07T13:12:24.000Z","size":332,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":7,"default_branch":"main","last_synced_at":"2025-04-24T17:08:52.859Z","etag":null,"topics":["python","sql"],"latest_commit_sha":null,"homepage":"https://sqlcompyre.readthedocs.io/en/latest/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Quantco.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-07-25T16:27:55.000Z","updated_at":"2025-04-07T13:12:26.000Z","dependencies_parsed_at":"2024-08-15T20:45:59.974Z","dependency_job_id":"c48f0f42-428b-4df7-8b6b-0036b9d2e872","html_url":"https://github.com/Quantco/sqlcompyre","commit_stats":null,"previous_names":["quantco/sqlcompyre"],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Quantco%2Fsqlcompyre","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Quantco%2Fsqlcompyre/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Quantco%2Fsqlcompyre/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Quantco%2Fsqlcompyre/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Quantco","download_url":"https://codeload.github.com/Quantco/sqlcompyre/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252216099,"owners_count":21713099,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["python","sql"],"created_at":"2024-11-13T00:28:18.573Z","updated_at":"2025-05-03T16:32:49.972Z","avatar_url":"https://github.com/Quantco.png","language":"Python","readme":"# SQLCompyre\n\n[![CI](https://img.shields.io/github/actions/workflow/status/quantco/sqlcompyre/ci.yml?style=flat-square\u0026branch=main)](https://github.com/quantco/sqlcompyre/actions/workflows/ci.yml)\n[![conda-forge](https://img.shields.io/conda/vn/conda-forge/sqlcompyre?logoColor=white\u0026logo=conda-forge\u0026style=flat-square)](https://prefix.dev/channels/conda-forge/packages/sqlcompyre)\n[![Documentation](https://img.shields.io/badge/docs-latest-success?branch=main\u0026style=flat-square)](https://sqlcompyre.readthedocs.io/en/latest/)\n[![pypi-version](https://img.shields.io/pypi/v/sqlcompyre.svg?logo=pypi\u0026logoColor=white\u0026style=flat-square)](https://pypi.org/project/sqlcompyre)\n[![python-version](https://img.shields.io/pypi/pyversions/sqlcompyre?logoColor=white\u0026logo=python\u0026style=flat-square)](https://pypi.org/project/sqlcompyre)\n\nSQLCompyre is a simple Python package that allows you to find and explore the differences between SQL tables, schemas, and entire databases. It provides both a Python interface and a CLI, allowing it to be used for both ad-hoc comparisons as well as in-depth analyses.\n\nSQLCompyre is designed to be dialect-agnostic and should, thus, work with most database systems out-of-the-box.\n\n## Usage example\n\nGiven a connection to a database, this snippet will print a report of the differences between two tables:\n\n```python\nimport sqlalchemy as sa\nimport sqlcompyre as sc\n\nengine = sa.create_engine(\"\u003cyour_connection_string\u003e\")\ncomparison = sc.compare_tables(engine, \"\u003cleft table name\u003e\", \"\u003cright table name\u003e\")\n\nreport = comparison.summary_report()\nprint(report)\n```\n\nTo find more examples and get started, please visit the [documentation](https://sqlcompyre.readthedocs.io/en/latest/).\n\n## Installation\n\nSQLCompyre can be installed via `pip` or `conda`:\n\n```bash\npip install sqlcompyre\n# or\nmicromamba install sqlcompyre\n# or\nconda install sqlcompyre\n```\n\nDetails on its usage can be found in the [documentation](https://sqlcompyre.readthedocs.io/en/latest/).\n\n## Development\n\nThis project is managed by [pixi](https://pixi.sh).\nYou can install the package in development mode using:\n\n```bash\ngit clone https://github.com/quantco/sqlcompyre\ncd sqlcompyre\n\npixi run pre-commit-install\npixi run postinstall\n```\n\n### Running Tests Locally\n\n1. Make sure you have `msodbcsql18` installed, or install it [here](https://learn.microsoft.com/en-us/sql/connect/odbc/download-odbc-driver-for-sql-server)\n\n2. Make sure you have `Docker` installed, or install it [here](https://docs.docker.com/get-docker/)\n\n3. Create a local test database with the following command:\n\n```bash\ndocker compose up\n```\n\n4. Set environment variable\n\n```bash\nexport DB_CONNECTION_STRING=\"mssql+pyodbc://sa:Passw0rd@localhost:1435/master?driver=ODBC+Driver+18+for+SQL+Server\u0026Encrypt=no\"\n```\n\n5. Navigate to the main directory of this repository and run pytest.\n\n```bash\npixi run test\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fquantco%2Fsqlcompyre","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fquantco%2Fsqlcompyre","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fquantco%2Fsqlcompyre/lists"}