Skip to main content

A headless login / logout script for 10.0.0.55

Project description

bitsrun

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

A headless login / logout script for 10.0.0.55 at BIT.

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

Usage

CLI

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.

Configuration file

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)

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

Install and run:

# Create virtual env and install deps
poetry install

# Enter poetry virtual env
poetry shell

# Install pre-commit hooks
pre-commit install

Build:

# Bump version
poetry version x.x.x

# Building the wheel
poetry build

Publish:

poetry publish

Credits

License

WTFPL 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

bitsrun-3.3.1.tar.gz (8.1 kB view details)

Uploaded Source

Built Distribution

bitsrun-3.3.1-py3-none-any.whl (8.7 kB view details)

Uploaded Python 3

File details

Details for the file bitsrun-3.3.1.tar.gz.

File metadata

  • Download URL: bitsrun-3.3.1.tar.gz
  • Upload date:
  • Size: 8.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.11.1

File hashes

Hashes for bitsrun-3.3.1.tar.gz
Algorithm Hash digest
SHA256 e135faa4317a4a2e6066d34d07a156c9537fba344706833a20131cbee4dfd654
MD5 1e0754b60ad5d378ded5d8e63d5d04d6
BLAKE2b-256 2db4107982a412d54107596119868e94efbc9f20497320e830d639b50573f029

See more details on using hashes here.

Provenance

File details

Details for the file bitsrun-3.3.1-py3-none-any.whl.

File metadata

  • Download URL: bitsrun-3.3.1-py3-none-any.whl
  • Upload date:
  • Size: 8.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.11.1

File hashes

Hashes for bitsrun-3.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 94e415c13bcbb33151f84fa9f62dc992f66687fe7965ee03cfa7d0b96fecff79
MD5 5149b9fd597ec671e1f6eb1acf185018
BLAKE2b-256 6d41f0883182415e1a68816c2337e48334e7873dabc22b22f65c1118a99aec63

See more details on using hashes here.

Provenance

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