Skip to main content

Python package for migrating Molgenis EMX2 staging areas to a catalogue.

Project description

Installation

pip install molgenis-emx2-staging-migrator

How to use

Within your Python project import the class StagingMigrator and use it as a context manager. Specify the URL of the server, the API token, the name of the target of the published data, i.e. the catalogue. It is recommended that the token not be written directly in your script but stored as an environmental variable and retrieved at runtime.

from molgenis_emx2_staging_migrator import StagingMigrator

token = ...

with StagingMigrator(url='https://example.molgeniscloud.org', token=token, 
                     target="catalogue") as migrator:

    # Retrieve sign-in information
    print(migrator.status)
    
    # Set the source and target schemas
    migrator.set_source('StagingExample')
    migrator.set_target('catalogue')
    
    # Execute the migration
    migrator.migrate()

Build

(venv) $ python -m build

(venv) $ pip install dist/molgenis_emx2_staging_migrator*.whl

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

molgenis_emx2_staging_migrator-13.14.0.tar.gz (7.4 kB view details)

Uploaded Source

Built Distribution

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

File details

Details for the file molgenis_emx2_staging_migrator-13.14.0.tar.gz.

File metadata

File hashes

Hashes for molgenis_emx2_staging_migrator-13.14.0.tar.gz
Algorithm Hash digest
SHA256 e32f209eae67ae6c05c70122c0725fe2a5c7cc2c580b5120954a075ebc5938d8
MD5 1a32cc98f2ec16d16d48813437a4dbff
BLAKE2b-256 0082f2509f42968b26f68afd7cb8d004bf6f580d9c8f6eba487918f06bce41d0

See more details on using hashes here.

File details

Details for the file molgenis_emx2_staging_migrator-13.14.0-py3-none-any.whl.

File metadata

File hashes

Hashes for molgenis_emx2_staging_migrator-13.14.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1cc80f613b978d6c36f75ead3eee1b3a82c5cbd5abd6e0c5ff898e6656e6ccf3
MD5 8bec12161604bd0f834b0113104e67c1
BLAKE2b-256 46312bebac03f270b123f24a0dda6ba340ef465fffd88e677274de1fb2ebe07f

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