Skip to main content

intuitive admin library

Project description

hostess

overview

hostess provides lightweight, Pythonic interfaces to distributed resources, system processes, and Python internals. It includes high-level modules that provide special functionality for working with EC2 instances and S3 buckets, and a framework (station) for workflow coordination -- along with all their lower-level building blocks.

hostess reduces syntactic headaches and boilerplate while still allowing low-level manipulation and, more broadly, still feeling like code. hostess has a special emphasis on fitting intuitively and idiomatically into common data science and scientific analysis workflows, but it is fundamentally a general-purpose utility and administration library.

installation

hostess is available on PyPI and conda-forge. We recommend installing it into a Conda environment using conda: conda install -n my_environment -c conda-forge hostess.

The conda-forge package installs all optional dependencies other than those for tests and Notebooks. If you require more granular control over dependencies, please install from PyPI or source.

documentation

Examples for working with EC2 instances can be found in this jupyter notebook.

Examples for working with S3 buckets can be found in this jupyter notebook.

You can find an API reference and full changelog on readthedocs. Documentation Status

compatibility

  1. hostess's core features are closely linked to the shell, so it is only fully compatible with Unix-scented operating systems. Linux and MacOS count, as does Windows Subsystem for Linux (WSL). Windows outside of WSL doesn't.
  2. Some hostess modules require network access, specifically ssh and the aws submodules. The aws submodules also require an AWS account. See the example Notebooks for more details on this.
  3. hostess requires Python >= 3.10.
  4. hostess is very lightweight. If a machine has enough resources to run a Python interpreter, it can probably run hostess.
  5. hostess.station is not fully compatible with MacOS or WSL. MacOS and WSL compatibility is planned. All other parts of hostess are compatible with MacOS and WSL.

cautions

hostess is a reliable and fairly feature-complete beta in active use on multiple projects. However, we do not yet guarantee interface stability or backwards compatibility.

Also, as with any system administration software, we recommend using it very carefully.

tests

hostess includes a simple test suite compatible with pytest. You can run the tests by executing pytest -s in the root directory. The -s flag is mandatory because pytest captures stdout by default, which breaks some hostess features covered by the tests.

Tests require two additional Python dependencies: pytest and pillow.

non-local tests

'Live' tests of non-local functionality provision AWS resources using the default AWS credentials (if any) available in the executing environment. These tests do not run by default. To execute these tests, pass --run-aws to pytest. They will only run successfully if the available AWS credentials are valid and if their associated account has the required permissions: ListObjectsV2, CreateBucket, DeleteBucket, GetObject, PutObject, DeleteObject, HeadObject, DescribeInstances, CreateFleet, StartInstances, StopInstances, TerminateInstances, CreateLaunchTemplate, and DeleteLaunchTemplete.

Warning: If the available AWS account has permissions to create but not delete resources, resources provisioned for tests will require manual cleanup. It is not in general possible to detect this permissions condition without actually creating and then attempting to delete a resource.

Manual cleanup may also be required if the OS kills the Python process running the tests, if the machine on which the tests are running fails, etc.

licensing

You can do almost anything with this software that you like, subject only to the extremely permissive terms of the BSD 3-Clause License.

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

hostess-0.11.0.tar.gz (492.1 kB view details)

Uploaded Source

Built Distribution

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

hostess-0.11.0-py3-none-any.whl (510.3 kB view details)

Uploaded Python 3

File details

Details for the file hostess-0.11.0.tar.gz.

File metadata

  • Download URL: hostess-0.11.0.tar.gz
  • Upload date:
  • Size: 492.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.5

File hashes

Hashes for hostess-0.11.0.tar.gz
Algorithm Hash digest
SHA256 ad8b820c0eac5c68b4e734b549b32237cdc962afb27e58b7bbbf68c1ddb94ad1
MD5 c329831dd4ec3f1dd1ca6bd5616e5742
BLAKE2b-256 f5c5648366eec40f00e2624b4525b60409575d7923240c89ab7b904e370a5c3b

See more details on using hashes here.

File details

Details for the file hostess-0.11.0-py3-none-any.whl.

File metadata

  • Download URL: hostess-0.11.0-py3-none-any.whl
  • Upload date:
  • Size: 510.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.5

File hashes

Hashes for hostess-0.11.0-py3-none-any.whl
Algorithm Hash digest
SHA256 213fc5c646743fa668b2ed8784bf3c83fa99f1bea3769e0541dafdc0b07ce03d
MD5 672e280cac3119bac258a0e5a3359ee2
BLAKE2b-256 890664e2ae5e9ab0d67c222c2d3e8a57ecc63288ce52995b8090c8178bb73fdb

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