mig_utils
A Minimum Intrusion Grid(MiG) utilities python library: It includes the mig.io module that provides access to MiG Sharelinks through python by wrapping around (https://github.com/althonos/fs.sshfs) for sshfs connections and (https://github.com/ParallelSSH/ssh2-python.git) for sftp which is the default and recommended connection
Installation
Installation from pypi
pip install mig-utils
Installation from a local git repository
cd mig-utils
pip install .
IO Example
ERDA (https://erda.dk) sharelink access with python3 example. A likewise sharelink class (IdmcShare) exists for IDMC (https://idmc.dk)
# First import the class that gives you access to the share in question*
from mig.io import ERDAShare, IDMCShare
# ERDA Sharelink example
print("ERDA")
# Open connection to a sharelink
erda_share = ERDAShare('SHARELINKID')
# List files/dirs in share
print(erda_share.list())
with erda_share.open('tmp', 'w') as tmp:
tmp.write("sdfsfsf")
# Get a _io.SFTPFileHandle object with automatic close
with erda_share.open('tmp', 'r') as tmp:
print(tmp.read())
# Get a default _io.SFTPFileHandle object with manual lifetime
file = erda_share.open('tmp', 'r')
print(file.read())
file.close()
# remove file
erda_share.remove('tmp')
print("\n")
# IDMC Sharelink example
print("IDMC")
# Open connection to a sharelink
idmc_share = IDMCShare('SHARELINKID')
# List files/dirs in share
print(idmc_share.list())
# write binary string
with idmc_share.open('b_tmp', 'wb') as b_tmp:
b_tmp.write(b'sadasdasd')
# Get a _io.SFTPFileHandle object with automatic close
with idmc_share.open('b_tmp', 'rb') as tmp:
print(tmp.read())
# Get a default _io.TextIOWrapper object with manual lifetime
file = idmc_share.open('b_tmp', 'rb')
print(file.read())
file.close()
Metadata
Release files for mig-utils 0.1.7.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| mig-utils-0.1.7.4.tar.gz | 5.2 kB | Without provenance | Details for mig-utils-0.1.7.4.tar.gz |
Built distributions (wheels)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| mig_utils-0.1.7.4-py3-none-any.whl | Python 3 | none | any | Details for mig_utils-0.1.7.4-py3-none-any.whl |
| mig_utils-0.1.7.4-py2-none-any.whl | Python 2 | none | any | Details for mig_utils-0.1.7.4-py2-none-any.whl |
Total release size: 17.1 kB
Release files / mig-utils-0.1.7.4.tar.gz
| Download URL | mig-utils-0.1.7.4.tar.gz |
|---|---|
| Size | 5.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
97718b3243aa606b29394c11cf0677a7b6935cd8d34fd4414c23be68bbb6c55b
|
|
BLAKE2b-256 checksum How to use checksums |
32c6563d810cef7719d8ad7425c77345e33c7ea56dba90c71d23c35ca52ff714
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.15.0 pkginfo/1.6.1 requests/2.25.1 setuptools/44.1.1 requests-toolbelt/0.9.1 tqdm/4.55.1 CPython/2.7.15
|
Release files / mig_utils-0.1.7.4-py3-none-any.whl
| Download URL | mig_utils-0.1.7.4-py3-none-any.whl |
|---|---|
| Size | 5.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
1209e3ce701df753337c2e2e166541c3737394c6c187043081de8058d99d228d
|
|
BLAKE2b-256 checksum How to use checksums |
54ff39383ff1909de993852c7b8f16ed5bbd4ce2391092f4023bbc6f3b5813f9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.3.0 pkginfo/1.6.1 requests/2.25.1 setuptools/51.1.1 requests-toolbelt/0.9.1 tqdm/4.55.1 CPython/3.7.1
|
Release files / mig_utils-0.1.7.4-py2-none-any.whl
| Download URL | mig_utils-0.1.7.4-py2-none-any.whl |
|---|---|
| Size | 5.9 kB |
| Tags | Python 2 |
|
SHA-256 checksum How to use checksums |
27966ab926a5e72916deac039b2337757e072b097fdf77562f4f37a9cfc2f9eb
|
|
BLAKE2b-256 checksum How to use checksums |
26088bbd080412dd758a51c73530cb7e203c7131398268d4864340a9ebd76505
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.15.0 pkginfo/1.6.1 requests/2.25.1 setuptools/44.1.1 requests-toolbelt/0.9.1 tqdm/4.55.1 CPython/2.7.15
|
Security for mig-utils 0.1.7.4
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.