Skip to main content

Python client for downloading and uploading data via ILL SFTP.

Project description

illdata

Lightweight Python client for working with ILL SFTP (Institut Laue–Langevin). It lets you:

  • connect to SFTP,
  • list available proposals,
  • open a specific proposal,
  • list files,
  • download files.

This package also offers logging, and a small CLI.

Installation (local)

pip install git+https://github.com/me2d09/ILLData.git

Requirements

  • Python >= 3.8
  • pysftp (installed automatically)

Quick start (Python)

from illdata import IllSftp

with IllSftp(hostname="host", username="user", password="pass") as ill:
    # list availavble proposals
    for p in ill.proposals():
        print(p)

    ill.open_proposal("12345")
    print(ill.listdir("."))
    ill.download("path/remote/file.dat", "downloads/file.dat")

Try it interactively by opening the example notebook: example.ipynb.

CLI

Install the package, then run:

illdata proposals --host HOST --user USER --password PASS
illdata open --proposal 12345 --host HOST --user USER --password PASS
illdata ls --proposal 12345 --path . --host HOST --user USER --password PASS
illdata get --proposal 12345 --remote path/on/server.dat --local ./data/file.dat --host HOST --user USER --password PASS

You can also provide credentials via environment variables:

  • ILL_HOST, ILL_USER, ILL_PASS, (optional) ILL_PORT, ILL_KNOWN_HOSTS

Logging

The library uses Python’s standard logging. Configure it in your app if you want to see info messages:

import logging
logging.basicConfig(level=logging.INFO)

Security notes

By default, host key verification is disabled (for compatibility with older SFTP setups). For secure use, pass a known_hosts file to the CLI (--known-hosts) or set known_hosts_path in code.

License

MIT

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

illdata-0.2.0.tar.gz (6.2 kB view details)

Uploaded Source

Built Distribution

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

illdata-0.2.0-py3-none-any.whl (7.3 kB view details)

Uploaded Python 3

File details

Details for the file illdata-0.2.0.tar.gz.

File metadata

  • Download URL: illdata-0.2.0.tar.gz
  • Upload date:
  • Size: 6.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for illdata-0.2.0.tar.gz
Algorithm Hash digest
SHA256 8c16e522ce300b7ff8c2f368ecd48e0ec318d773ecaaa5007d7029754c667458
MD5 f29f11c7117270118c48cc671d312f38
BLAKE2b-256 b4dab6bfa13ae64a67b9e2cbffbf8bf2777e329f209428dacee67de8a4a5c2de

See more details on using hashes here.

Provenance

The following attestation bundles were made for illdata-0.2.0.tar.gz:

Publisher: publish.yml on me2d09/ILLData

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file illdata-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: illdata-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 7.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for illdata-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 011286de0bb01b19c9eff9f8fd53409174ad8a02f940d8448e26ea966b85648d
MD5 2e39a4e217b6c8a3d66a566852edcda2
BLAKE2b-256 a357986f31bb79cde294b90595c7b74c02d470731c4af1af40b799110280b587

See more details on using hashes here.

Provenance

The following attestation bundles were made for illdata-0.2.0-py3-none-any.whl:

Publisher: publish.yml on me2d09/ILLData

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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