A headless login / logout script for 10.0.0.55
Project description
bitsrun
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 Username.
-p, --password TEXT Password.
-v, --verbose Verbosely echo API response.
-s, --silent Silent, no output to stdout.
--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)
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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file bitsrun-3.2.4.tar.gz
.
File metadata
- Download URL: bitsrun-3.2.4.tar.gz
- Upload date:
- Size: 7.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.16
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 034e6ba60b29ed04c30c4776523dc73b2629325d6051bedece743c3ab78cc5af |
|
MD5 | 8e10a5455ef0b0e759928e530bf80d99 |
|
BLAKE2b-256 | 18fc3b12309e22368d4206bb219b44e79b99a37ffcb528b3c3399bfe15d418b9 |
Provenance
File details
Details for the file bitsrun-3.2.4-py3-none-any.whl
.
File metadata
- Download URL: bitsrun-3.2.4-py3-none-any.whl
- Upload date:
- Size: 8.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.16
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a52245dd3187d44e0215151127b4a2922e449c1e2d47bd336d87c3115b763998 |
|
MD5 | 1e922533a2e205233da6ea902c9c3508 |
|
BLAKE2b-256 | 3753f863a92edef8bfc92b146ab1bd22967387d3204442a298ebb23b6b070a3c |