Skip to main content

bitsrun

Ruff Pre-commit PyPI Publish PyPI PyPI - Python Version PyPI - Downloads

A headless login / logout script for 10.0.0.55 at BIT.

✨ Blazingly™ Fast Rust re-implementation of bitsrun available at spencerwooo/bitsrun, if you require or prefer a single compiled executable (or 🦀 Rust).

Install

You need at least Python 3.8. We recommend installing with pipx.

python3 -m pip install --user pipx
python3 -m pipx ensurepath

After which, install bitsrun with pipx.

pipx install bitsrun

Alternatively, you can download a self-contained executable from GitHub Releases if you are working from an environment that does not have internet access.

Usage

CLI

Check login status of your device.

bitsrun status

Usage: bitsrun status [OPTIONS]

  Check current network login status.

Options:
  --json / --no-json  Output in JSON format.
  --help  Show this message and exit.

Note: this is the output of bitsrun status --help.

Login or logout with your username and password.

bitsrun login

Usage: bitsrun login/logout [OPTIONS]

  Log into or out of the BIT network.

Options:
  -u, --username TEXT  Your username.
  -p, --password TEXT  Your password.
  -v, --verbose        Verbosely echo API response.
  --help               Show this message and exit.

Note: this is the output of bitsrun login/logout --help.

Credentials config

Create new file named bit-user.json:

{
    "username": "xxxx",
    "password": "xxxx"
}

This file should be put under the following directory:

  • Windows: %APPDATA%\bitsrun
  • macOS and Linux: ~/.config/bitsrun (Following the XDG spec)

On unix, set the file permission to 600, i.e., only read/writeable by the owner:

chmod 600 path/to/bit-user.json

Now you can simply call:

bitsrun login
bitsrun logout

Besides, a system-wide configuration file is supported, and the location also depends on your platform.

To list all possible paths for your system (including those only for backward compatibility), call:

bitsrun config-paths

Raycast script (macOS)

raycast screenshot

Import the two Raycast scripts from ./scripts and setup your config file in ~/.config/bit-user.json. The script uses /usr/bin/python3 by default, so you either need to install bitsrun with this Python interpreter or setup your own Python interpreter path in the script.

Developing

Create virtual environment and install deps:

python -m venv venv
source venv/bin/activate
pip install -e .

Running CLI entry:

python src/bitsrun/cli.py

Build:

pip install setuptools build
python -m build

License

WTFPL License

Metadata

Release files for bitsrun 3.7.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 bitsrun 3.7.1
File Size Uploaded
bitsrun-3.7.1.tar.gz 12.2 kB Details

Built distribution (wheel)

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

Total release size: 23.5 kB

Release files / bitsrun-3.7.1.tar.gz

Download URL bitsrun-3.7.1.tar.gz
Size 12.2 kB
Tags Source
SHA-256 checksum
How to use checksums
1d824f9c7bf8ab4b040a21e21873e09b72d19e4994960099e0a2eafc6c8bbbf0
BLAKE2b-256 checksum
How to use checksums
e44a830a3e27caf33b8b07041588e79eafb15373584c755a7c50baa3e233568c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.9

Release files / bitsrun-3.7.1-py3-none-any.whl

Download URL bitsrun-3.7.1-py3-none-any.whl
Size 11.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
19d3ee5d86bd429e6bcfa307939b6d7effc3f87e6234f009271f7e2e0c545bf9
BLAKE2b-256 checksum
How to use checksums
a47c32401a85bb51cc0f1fe52b4fb50ca93e8cf8244acb5da0e8a473da53438f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.9

Release history Release notifications | RSS feed

This release

3.7.1 This release

2 release files

3.7.0

2 release files

3.6.0

2 release files

3.5.2

2 release files

3.5.1

2 release files

3.5.0

2 release files

3.4.1

2 release files

3.4.0

2 release files

3.3.1

2 release files

3.3.0

2 release files

3.2.4

2 release files

3.2.3

2 release files

3.2.2

2 release files

3.2.0

2 release files

3.1.1

2 release files

3.1.0

2 release files

3.0.0

2 release files

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