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.133.1.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.133.1.tar.gz.

File metadata

File hashes

Hashes for molgenis_emx2_staging_migrator-13.133.1.tar.gz
Algorithm Hash digest
SHA256 9bc423daee91e9a23ca5d0f095d4e1a6d5ef55cac6c69405dfde071738e5448c
MD5 a7a533b72a9b75213269d3c5d703effb
BLAKE2b-256 fbccaadba45b585164f32940822c47f1d22bb4242cce00868b006b3e58974ef7

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for molgenis_emx2_staging_migrator-13.133.1-py3-none-any.whl
Algorithm Hash digest
SHA256 921006cf71e8955aa30ee69342d6be8bba69196086adaffce1ba4fe511c00312
MD5 c87680fae06f2c24d6b369675e2314bb
BLAKE2b-256 37a8900bffc9d15433cd14229c1b3d3dad9c850c00117936a3dad60fb15b718a

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