Skip to main content
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.

Metadata

Release files for pyheimdall-mysql 1.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pyheimdall-mysql 1.1.0
File Size Uploaded
pyheimdall_mysql-1.1.0.tar.gz 19.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pyheimdall-mysql 1.1.0
File Interpreter ABI Platform
pyheimdall_mysql-1.1.0-py2.py3-none-any.whl Python 2, Python 3 none any Details

Total release size: 37.4 kB

Release files / pyheimdall_mysql-1.1.0.tar.gz

Download URL pyheimdall_mysql-1.1.0.tar.gz
Size 19.3 kB
Tags Source
SHA-256 checksum
How to use checksums
03f67b36e8fba90cabaa1dedd4bf76ed9c433f26946bcbcebd6a19f82cafec74
BLAKE2b-256 checksum
How to use checksums
69fc4d2e04b4a7536020f4c0078b0d761a1a261eeffafadbc511ed5a4b206dc5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.3

Release files / pyheimdall_mysql-1.1.0-py2.py3-none-any.whl

Download URL pyheimdall_mysql-1.1.0-py2.py3-none-any.whl
Size 18.1 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
bb31efd2357dfb5338b21d57b562ea2d1104c40711fde26c5e7abc2c8900e277
BLAKE2b-256 checksum
How to use checksums
546daefcbb6d40fc23cf78cd5417662f4b18245907b5d0b19242ffeeb9563052
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.3

Release history Release notifications | RSS feed

This release

1.1.0 This release

2 release files

1.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page