Skip to main content

binary runner with cache

Project description

Bincache

Build Status PyPI License Issues PRs Welcome

Bincache is a command-line utility designed to cache the output of executable binaries and shell commands.

Installation

pip install bincache

Usage

Execute commands through bincache to cache their output.

Basic Usage

bincache <binary_or_command> <arg1> [arg2 ... argN]

Examples

Cache the output of the date command:

bincache date

Cache the output of a binary executable:

bincache ./a.out -l -a

Configuration

Bincache can be configured using a configuration file bincache.conf. The default configuration file is expected to be located at $HOME/.cache/bincache/bincache.conf.

Configuration Options

  • max_size: Maximum cache size (e.g., 5G for 5 Gigabytes), default 5G
  • log_file: Path to the log file, default empty
  • log_level: Logging level (INFO, DEBUG, WARNING, ERROR, CRITICAL), default INFO
  • stats: Enable or disable statistics, default false

Example bincache.conf:

max_size = 5G
log_file = /var/log/bincache.log
log_level = INFO
stats = false

Environment Variables

  • BINCACHE_DIR: Override the default cache directory.

Contributing

To contribute to Bincache, fork the repository, make your changes, and create a pull request. Please ensure that your changes are well-tested by run pytest.

License

Bincache is licensed under the MIT License. See the LICENSE file for more information.

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

bincache-0.0.11.tar.gz (11.8 kB view details)

Uploaded Source

Built Distribution

bincache-0.0.11-py3-none-any.whl (13.8 kB view details)

Uploaded Python 3

File details

Details for the file bincache-0.0.11.tar.gz.

File metadata

  • Download URL: bincache-0.0.11.tar.gz
  • Upload date:
  • Size: 11.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.0 CPython/3.12.4

File hashes

Hashes for bincache-0.0.11.tar.gz
Algorithm Hash digest
SHA256 a256e84acb1d20c9399cd6775e1ec636b52f87fdf2db6d630553b5a9d6e3534d
MD5 a44febc0e4898de2c58715cbb8541da0
BLAKE2b-256 96f28559c2b82217c1ee71ca014edf745b5f8dc74e6d727732ae4d57415aee4e

See more details on using hashes here.

File details

Details for the file bincache-0.0.11-py3-none-any.whl.

File metadata

  • Download URL: bincache-0.0.11-py3-none-any.whl
  • Upload date:
  • Size: 13.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.0 CPython/3.12.4

File hashes

Hashes for bincache-0.0.11-py3-none-any.whl
Algorithm Hash digest
SHA256 9c65f8ac9f4dd94b9c2ec95dfef657decf7231b6744cd7bd790acbcd2bed5063
MD5 5832935ae252f3047165e5c61d379358
BLAKE2b-256 6787b913c940855f925728b759a4ed23248c2da7101ad0bcc303bb0f47fcee83

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page