semvec/pypi-packages huggingface dataset:
clifun 0.0.2
Construct a comand line interface based on a function or class
License: MIT
Requires Python: >=3.6.2,<4.0

# clifun

Because cli's should be fun(ctions) ;).

```
import clifun

def my_program(a: int, b: str = "not provided"):
  print(f"Running some code with: a={a}, b={b}")

if __name__ == "__main__":
  clifun.call(my_program)
```

That's all it takes. Clifun will inspect your function and collect the values it needs it from command line arguments, environment variables, or config files, and then call it.

```
python examples/function --a 1
```
```
Running some code with: a=1, b=not provided
```

You can even run functions in any module without modifying the module at all

```
python clifun.py examples/module.py my_program --a 1
```
if you have the code checked out. Or if you pip installed

```
python -m clifun some_module.py function ...
```

Or if you have environment variables defined

```
export A=1
export B=hi
python example.py
```
again yields without you having to provide values
```
Basic(a=1, b='hi')
```

`clifun` also supports nested objects (or functions taking complex objects as inputs)

```
from typing import Optional
import datetime as dt

import attr
import clifun


@attr.s(auto_attribs=True, frozen=True)
class Foo:
    a: dt.datetime
    b: Optional[str] = None


@attr.s(auto_attribs=True, frozen=True)
class Bar:
    f: Foo
    c: int

def my_program(f: Foo, c: int):
    print(Bar(f, c))


if __name__ == "__main__":
    bar = clifun.call(my_program)
```

You specify values for the fields in the nested class by referring to them with a their field name in the outer class

```
python examples/advanced.py --c 1 --f.a 2020-01-01 --f.b hi
```
```
Bar(f=Foo(a=datetime.datetime(2021, 1, 1, 0, 0), b='hi'), c=1)
```

You can also supply one or more `json` formatted `config` files. Provide the name(s) of these files as positional arguments. `clifun` will search them, last file first, for any keys fields that are not provided at the command line before searching the environment.

```
python examples/advanced.py --c 1 examples/foo.json
```
```
Bar(f=Foo(a=datetime.datetime(2021, 1, 1, 0, 0), b='str'), c=1)
```

`clifun` is inspired by [clout](https://github.com/python-clout/clout), but I wanted to try being a bit more opinionated to make both the library and code using it simpler.
plusportals 0.2.5
A reverse engineered API PlusPortals
License: MIT
Requires Python: >=3.6
Keywords: api,reverse-engineered,plusportals,plusportalsapi

</p>
<p align="left">
<a href="https://github.com/DhruvBisla/PlusPortalsAPI/actions">
    <img src="https://github.com/DhruvBisla/PlusportalsAPI/workflows/Tests/badge.svg" alt="Test Status">
</a>
<a href="https://pypi.org/project/plusportals/">
    <img src="https://img.shields.io/pypi/v/plusportals?color=success&label=pypi%20package&logo=PyPi" alt="Package Version">
</a>
</p>

# PlusPortalsAPI
A reverse-engineered API providing access to information displayed on the PlusPortals web application.

# Requirements
Python 3.6+

# Installation
```shell
pip3 install plusportals
```

# Usage

```python
import plusportals as pp
client = pp.Client(True, School, Email, ID, Password)
client.printGrades(markingPeriod)
```

The code above imports the plusportals module, instantiates a client with your login credentials, and prints your grades of the specified `markingPeriod`.

The first parameter passed to the `Client` constructor is whether you would like your credentials to be cached so that they do not have to be provided again after the first time, in which case you may simply instantiate a client with `client = pp.Client()`. The succeeding parameters are your PlusPortals login credentials: school name, email, ID, and password. Your ID is the multi-digit number found in the URL when you login to Plusportals.

Finally, you can print the grades for each of your classes, as is done in the last line, where markingPeriod is the markingPeriod for which you would like to view your grades, e.g., 1 for Semester 1 and 2 for Semester 2.

To be notified when your grades change, this package comes with the `Tracker` class. Using the code below, you will be notified of a change in your grades (provided that your computer is on) with a little print statement and three beeps.

```python
import plusportals as pp
tracker = pp.Tracker(markingPeriod, School, Email, ID, Password)
tracker.track()
```

The constructor for the `Tracker` closely resembles that of `Client`. Note that the `markingPeriod` paramter is a required parameter that is necessary for the tracker to work as desired. The `track()` method simply sends a requests to fetch the grades every 30 seconds. If the response does not match the previous, it prints a message that is accompanied by three consecutive system alert sounds.
bobcat-miner-python 0.1.0
A python SDK for interacting with the bobcat miner.
License: MIT
Requires Python: >=3.8,<4.0
Keywords: helium,bobcat,miner

# bobcat-miner-python

A python SDK for interacting with the bobcat miner.

# Install

```bash
pip install bobcat-miner-python
```

# Bobcat Usage

```python
import bobcat_miner

bobcat = Bobcat(ip_address="192.168.1.10")

# data refresh
bobcat.refresh_status()
print(bobcat.status)
# {"status": "Synced", "gap": "0", "miner_height": "1148539", "blockchain_height": "1148539", "epoch": "30157"}

bobcat.refresh_miner()
print(bobcat.miner)
# {"ota_version": "1.0.2.66", "region": "region_us915", "frequency_plan": "us915", "animal": "my-mocked-miner", ... }

bobcat.refresh_speed()
print(bobcat.speed)
# {"DownloadSpeed": "94 Mbit/s", "UploadSpeed": "57 Mbit/s", "Latency": "7.669083ms"}

bobcat.refresh_dig()
print(bobcat.dig)
# {"name": "seed.helium.io.", "DNS": "Local DNS", "records": [{"A": "54.232.171.76", ... ]}

# actions
bobcat.reboot()
bobcat.resync()
bobcat.fastsync()
bobcat.reset()

# diagnostics
bobcat.is_healthy()
bobcat.is_running()
bobcat.is_synced()
bobcat.is_temp_safe()
bobcat.has_errors()
bobcat.is_relayed()
bobcat.should_reboot())
bobcat.should_resync()
bobcat.should_fastsync()
bobcat.should_reset()
```

:warning: `bobcat.refresh_speed()` takes about 30 seconds to complete and you should not call it repeatedly. Doing so will slow down your internet speed, which in turn will slow down your miner.

# Autopilot Usage

If the bobcat miner is unhealthy then the autopilot will attempt to repair it.

```python
import os

import bobcat

bobcat = Bobcat(os.getenv("BOBCAT_IP_ADDRESS"))
bobcat.autopilot()
```

# Troubleshooting

Please see [No Witness's Troubleshooting Guide](https://www.nowitness.org/troubleshooting/) for more information troubleshooting your bobcat miner.

# Donations

Donations are welcome and appreciated!

[![HNT: 14HmckNU4WHDDtGH29FMqVENzZAYh5a9XRiLfY2AN6ghfHMvAuR](./images/wallet.jpg)](https://explorer-v1.helium.com/accounts/14HmckNU4WHDDtGH29FMqVENzZAYh5a9XRiLfY2AN6ghfHMvAuR)

HNT: [14HmckNU4WHDDtGH29FMqVENzZAYh5a9XRiLfY2AN6ghfHMvAuR](https://explorer-v1.helium.com/accounts/14HmckNU4WHDDtGH29FMqVENzZAYh5a9XRiLfY2AN6ghfHMvAuR)