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.129.2.tar.gz (11.6 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.129.2.tar.gz.

File metadata

File hashes

Hashes for molgenis_emx2_staging_migrator-13.129.2.tar.gz
Algorithm Hash digest
SHA256 f04a76c1a3de20ec3d088ec8eff44d43d664a0770324b36b103049e9430c3e74
MD5 da88a33af219392e244f7c15767db355
BLAKE2b-256 b68c5febbf7d53a32747ea50f01de2681c64592c1155e5a09846e27030630ac4

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for molgenis_emx2_staging_migrator-13.129.2-py3-none-any.whl
Algorithm Hash digest
SHA256 c621e862412d5f48400c175f4e5f2dfe430612f8a64d48208e8814075f1f1e60
MD5 2ec75c8508f95a76536f8d65f219d1f4
BLAKE2b-256 48a0483d79e29b19fbc1e37f10fc7a03a3cd20af75aed9bca9db341a3bef523d

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