Skip to main content

Python client for downloading data from Institute Laue Langevin via 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.1.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.1-py3-none-any.whl (7.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: illdata-0.2.1.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.1.tar.gz
Algorithm Hash digest
SHA256 69eac7982ff3425775195bb247e0420b382f3bbd29e9951f42ccb4fc992ac729
MD5 b4ec9d0a08c86b978230a4d2c3bf0449
BLAKE2b-256 fb6c731c483535e288a17eb09daa696b4bf24182fc4a3d4c431e4c6f32195e68

See more details on using hashes here.

Provenance

The following attestation bundles were made for illdata-0.2.1.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.1-py3-none-any.whl.

File metadata

  • Download URL: illdata-0.2.1-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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 5c2d1e9c4c7f57df418885ab37fd782d2ab2911096a6c0553abe0d26146c52bf
MD5 68ff36d9f1db1028a9062fec9235d9b9
BLAKE2b-256 e03136fd322798478ea96075f643dda22b688792247e501631c5a3d568959699

See more details on using hashes here.

Provenance

The following attestation bundles were made for illdata-0.2.1-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