Skip to main content

MySQL connector for pyHeimdall

Project description

https://img.shields.io/badge/license-AGPL3.0-informational?logo=gnu&color=success https://www.repostatus.org/badges/latest/active.svg PyPI Version https://img.shields.io/badge/documentation-api-green https://gitlab.huma-num.fr/datasphere/heimdall/connectors/mysql/badges/main/pipeline.svg https://gitlab.huma-num.fr/datasphere/heimdall/connectors/mysql/badges/main/coverage.svg

What is this?

pyHeimdall is a tool for converting more easily one or more databases from one format to another. It leverages modules called “connectors”, responsible for conversion of data between specific databases schemas and the HERA format.

This repository implements a connector to retrieve data from a MySQL database. The implementation doesn’t need any intervention on pyHeimdall proper.

How can I use it?

Setup

This MySQL pyHeimdall connector is available as a PyPI package named pyheimdall-mysql. You can install it using the pip package manager:

pip install pyheimdall-mysql

You can use pip to either upgrade or uninstall this connector, too:

pip install --upgrade pyheimdall-mysql
pip uninstall pyheimdall-mysql

Usage

import heimdall

tree = heimdall.getDatabase(
        format='sql:mysql',
        url='mysql://myusername:mypassword@myhost:myport/mydatabase',
        entities=('mytable', 'myothertable', ),
        )
heimdall.createDatabase(tree, format='hera:xml', url='mydatabase.xml')

Please note that you don’t need to use pyheimdall-mysql functions directly. As long as the package is installed on your system, pyHeimdall will automatically discover its features and allow you to use them as long as any other default or external connector.

Is it tested?

Of course! Here’s the coverage report.

Please note, however, than this coverage report is produced by a continuous integration (CI). This CI relies in part on third party tools which are not MySQL, but MariaDB. At the time of writing, MySQL and MariaDB still have a lot in common, but this may not be the case when you’ll read these lines.
Moreover, as time goes by, the MySQL tools used by our CI will become outdated, and we don’t plan to maintain them up to date as, still at the time of writing, it’s becoming increasingly difficult to easily deploy MySQL instead of MariaDB, and the existing ways are subject to Oracle’s whim.
In other words, this connector should work on your MySQL database, but we can’t guarantee it on the long term. If you detect an issue, and/or can provide a solution, feel free to contribute!

For an alternative, consider using MariaDB, and the connector pyheimdall-mariadb.

How can I contribute?

This project welcomes any feedback or proposal. Details can be accessed here

License

GNU Affero General Public License version 3.0 or later

This project is not affiliated, associated, authorized, endorsed by, or in any way officially connected with MySQL or Oracle, or any of its subsidiaries or its affiliates. The official MySQL website can be found at https://www.mysql.com/. The name MySQL as well as related names, marks, emblems and images, are registered trademarks of Oracle.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pyheimdall_mysql-1.1.0.tar.gz (19.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pyheimdall_mysql-1.1.0-py2.py3-none-any.whl (18.1 kB view details)

Uploaded Python 2Python 3

File details

Details for the file pyheimdall_mysql-1.1.0.tar.gz.

File metadata

  • Download URL: pyheimdall_mysql-1.1.0.tar.gz
  • Upload date:
  • Size: 19.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.3

File hashes

Hashes for pyheimdall_mysql-1.1.0.tar.gz
Algorithm Hash digest
SHA256 03f67b36e8fba90cabaa1dedd4bf76ed9c433f26946bcbcebd6a19f82cafec74
MD5 9e59fc5fbb5901ee2571067cffbf3e17
BLAKE2b-256 69fc4d2e04b4a7536020f4c0078b0d761a1a261eeffafadbc511ed5a4b206dc5

See more details on using hashes here.

File details

Details for the file pyheimdall_mysql-1.1.0-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for pyheimdall_mysql-1.1.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 bb31efd2357dfb5338b21d57b562ea2d1104c40711fde26c5e7abc2c8900e277
MD5 ac9d42a52de7a0b3ff066f734b7a1fd6
BLAKE2b-256 546daefcbb6d40fc23cf78cd5417662f4b18245907b5d0b19242ffeeb9563052

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page