Skip to main content

WIP!! This is incomplete/theoretical examples!

baci - very simple cli framework (for the very lazy)

Got No time to learn and download a huge framework just to make some simple clis? Yeah me neither I got a board game meetup to get to after this!

Why not just write a bunch of vanilla python functions and let baci deal with the weird linux stuff?!

# cli.py

# this can already be a cli command!
def say_hello():
    # docstring adds a description to --help options
    """Prints hello to the screen"""
    print("hello lazy!")

if __name__ == '__main__':
    from baci import Baci
    baci = Baci(commands=(say_hello,))
    baci.run()
$ python cli.py say-hello
hello lazy!

But generally you would add an entrypoint to your cli that discovers all functions:

from baci import Baci

baci.autorun(dir="./commands")

All non-private defined functions in commands/ will be registerd in the cli

Prefix a function with a _ to be ignored. That's the only way.

philosophies

Be a strong, independent package who don't need no pypi

Dependencies means vulnerabilities, which means frequent patching and updating. WHO GOT TIME FOR DAT?

Write it all in-house.

Update like it's moving apartments

Would you move to a new studio bedroom every month?

Command line syntax hasn't changed for decades, what's there to update?

Make it feature complete and reliable.

The only exceptions are if there's a bug. Just like in your apartment, you would make the effort to get rid of bugs.

There's no zen here, bub!

We don't follow zen of python. Zen is nice but we live in the real world, ya dig? No bad-ass mf got time for explicitly stating everything. So just learn the conventions here once and save big on keystrokes!

Metadata

Release files for baci 0.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for baci 0.0.1
File Size Uploaded Provenance Actions
baci-0.0.1.tar.gz 10.0 kB Without provenance Details for baci-0.0.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for baci 0.0.1
File Interpreter ABI Platform Actions
baci-0.0.1-py3-none-any.whl Python 3 none any Details for baci-0.0.1-py3-none-any.whl

Total release size: 21.3 kB

Release files / baci-0.0.1.tar.gz

Download URL baci-0.0.1.tar.gz
Size 10.0 kB
Tags Source
SHA-256 checksum
How to use checksums
02ae5213abaebdec329a8ee3cfa2d48b6aa19c382de45e9489fe219d7c281c2b
BLAKE2b-256 checksum
How to use checksums
2e95f92c9c98c743857b0e4accdc67556c40c093f1789dc2a4114c7833a76da1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.11.0

Release files / baci-0.0.1-py3-none-any.whl

Download URL baci-0.0.1-py3-none-any.whl
Size 11.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
cf69b57d6915554192b05394732d6cc83fcf76cc1346bffbc71d1536c485d8c5
BLAKE2b-256 checksum
How to use checksums
13bb68baf7f58629a8b10f59ca7df3c58975cf43b67a0a31ade5ca1d3729271b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.11.0

Security for baci 0.0.1

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.

Release history Release notifications | RSS feed

This release

0.0.1 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page