semvec/pypi-packages huggingface dataset:
gamewire 1.0.0
A Python SDK for the Gamewire API
Requires Python: >=3.6

# Gamewire Python SDK

A Python SDK for interacting with the Gamewire API.

## Installation

You can install the Gamewire SDK using pip:

```
pip install gamewire
```

## Usage

Here's a quick example of how to use the Gamewire SDK:

```python
from gamewire import GamewireClient

# Initialize the client
client = GamewireClient("your_email@example.com", "your_password")

# Get user balance
balance = client.get_balance()
print(f"Your balance is: {balance['balance']}")

# Create an instance
instance = client.create_instance("eu-1", "RTX 3070", "Linux", 100)
print("Instance created:", instance)

# Get instance details
instance_details = client.get_instance()
print("Instance details:", instance_details)
```

## Available Methods

The GamewireClient provides the following methods:

- `get_balance()`: Retrieve the user's balance
- `get_instance()`: Get details of the current instance
- `start_instance()`: Start an instance
- `stop_instance()`: Stop an instance
- `get_regions()`: Get available regions
- `get_region(region)`: Get details of a specific region
- `create_instance(region, instance_type, os, storage)`: Create a new instance
- `delete_instance()`: Delete the current instance

## Authentication

The SDK handles authentication automatically. Simply provide your email and password when initializing the GamewireClient:

```python
client = GamewireClient("your_email@example.com", "your_password")
```

The client will manage the authentication token for you.

## Error Handling

The SDK uses requests' built-in exception handling. If an API request fails, it will raise an HTTPError exception. You can catch and handle these exceptions in your code:

```python
from requests.exceptions import HTTPError

try:
    balance = client.get_balance()
except HTTPError as e:
    print(f"An error occurred: {e}")
```

## Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

## License

This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
```
moontool 0.2.0
John Walker's moontool.c astronomical calculation routines, extracted and ported to Python.
Requires Python: >=3.12
Keywords: moon

# Moontool

[![license: 0BSD](https://img.shields.io/badge/license-0BSD-blue)](https://opensource.org/license/0BSD)
[![crates.io](https://img.shields.io/crates/d/moontool?logo=rust&logoColor=white&color=orange)](https://crates.io/crates/moontool)

John Walker's moontool.c astronomical calculation routines, extracted.

## Original

The original versions, [moontool](https://www.fourmilab.ch/moontool/)
and [moontoolw](https://www.fourmilab.ch/moontoolw/), are available at
John Walker's [fourmilab.ch](https://www.fourmilab.ch/).

Backup copies are included in the [`original/`](./original/) directory
of this repository.

## License

Walker's program is in the public domain, and so is this project.

In Walker's words:

> Do what thou wilt shall be the whole of the law.

## CLI

This version includes functions that compute info about the Moon, in a
way similar to the original program.

The CLI wraps these functions.

```
$ moontool 1994-12-22T13:53:34

Phase
=====

Julian date:            2449709.07887   (0h variant: 2449709.57887)
Universal time:         Thursday  13:53:34 22 December 1994
Local time:             Thursday  14:53:34 22 December 1994

Age of moon:            18 days, 22 hours, 29 minutes.
Lunation:               64.13%   (🌖 Waning Gibbous)
Moon phase:             81.56%   (0% = New, 100% = Full)

Moon's distance:        386212 kilometres, 60.6 Earth radii.
Moon subtends:          0.5157 degrees.

Sun's distance:         147151251 kilometres, 0.984 astronomical units.
Sun subtends:           0.5420 degrees.

Moon Calendar
=============

Last new moon:          Friday    23:54 UTC  2 December 1994    Lunation: 890
First quarter:          Friday    21:06 UTC  9 December 1994
Full moon:              Sunday     2:18 UTC 18 December 1994
Last quarter:           Sunday    19:07 UTC 25 December 1994
Next new moon:          Sunday    10:56 UTC  1 January 1995     Lunation: 891
```

<p align="center">
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀<br />
⠀⠀⠀⠀⠀⠀⠀⠀⠀⣀⡠⠤⠀⠠⠀⠀⠄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀<br />
⠀⠀⠀⠀⠀⠀⣠⠶⡥⠤⠖⠢⠴⢭⠭⡖⢔⠦⣤⡀⠀⠀⠀⠀⠀⠀⠀⠀<br />
⠀⠀⠀⠀⠔⠓⢱⣎⣵⠚⠀⠀⠀⠀⠉⢿⣁⣷⣿⠙⢆⠀⠀⠀⠀⠀⠀⠀<br />
⠀⠀⢠⠊⠁⠀⣀⠈⠁⠀⠀⡀⠀⠀⠀⢘⡗⠁⠈⠘⠙⠂⠀⠀⠀⠀⠀⠀<br />
⠀⢠⡋⠀⡄⠁⠀⡢⣀⠰⣀⠂⠀⣀⣠⢉⠄⠀⠀⠀⠑⠀⠀⠀⠀⠀⠀⠀<br />
⠀⣮⣥⠀⠀⢰⣁⣱⢈⡆⢘⣕⠂⠂⠀⠈⠈⡶⠢⠀⠀⠀⠀⠀⠀⠀⠀⠀<br />
⠀⣇⢹⣇⢀⠀⠀⢉⢤⢛⡏⠥⡀⠘⠲⢤⣼⡕⠀⠀⢀⣄⠄⠀⠀⠀⠀⠀<br />
⠈⣿⢿⣳⣮⣀⡀⠳⠌⠀⠻⢠⣼⠷⡎⢩⠉⠔⢠⠀⠾⠿⡅⠀⠀⠀⠀⠀<br />
⠀⣟⡿⠟⣏⠀⠉⢐⠥⠁⠀⠉⣴⠡⡩⡩⢡⣿⡒⣄⣀⣼⡇⠀⠀⠀⠀⠀<br />
⠀⠸⣏⢘⢸⣆⡀⠂⡨⡂⠤⡼⢁⠽⣉⣴⣟⢻⣮⣾⡂⡷⠂⠀⠀⠀⠀⠀<br />
⠀⠀⠹⡮⡍⣙⠧⣑⡀⠊⠀⠃⠁⢖⣡⣶⡿⢯⠽⣖⣖⡄⠀⠀⠀⠀⠀⠀<br />
⠀⠀⠀⠈⢮⡛⠭⣽⣥⠶⠀⡀⠀⢒⢶⣶⣿⡿⣿⣿⠟⠀⠀⠀⠀⠀⠀⠀<br />
⠀⠀⠀⠀⠀⠉⠻⣍⡂⡴⡷⠲⠸⢞⠶⡤⣿⢿⡋⠋⠀⠀⠀⠀⠀⠀⠀⠀<br />
⠀⠀⠀⠀⠀⠀⠀⠀⠉⠒⠳⠤⠤⠌⠁⠩⠌⠉⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀<br />
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀<br />
</p>
cli-buddy 0.2.6
The fastest, simplest way to create CLIs in Python
Requires Python: <4.0,>=3.11
Keywords: data validation, dataclasses, validation, models, meta-programming


# The fastest, simplest way to create a CLI in Python

`cli-buddy` provides an ergonomic syntax for creating command-line interfaces in Python.

### With `cli-buddy`, 👇 this code snippet is all it takes to build a CLI.

```python
from cli_buddy import CLI

class MyCLI(CLI):
    arg: str
```

Under the hood, `cli-buddy` is a pydantic-flavored wrapper around the built-in `argparse` module.


## Requirements
* Python 3.11+

## Install

```bash
pip install cli-buddy
```

## Usage

### Use the `CLI` class to define your CLI's arguments and options.


This code snippet...

```python
# main.py
from cli_buddy import CLI

class TerminalTimer(CLI):
    seconds: int
    # boolean fields are automatically converted to flags
    show_time: bool
```

... will produce the following CLI:

```bash
$ python main.py --help
usage: main.py [-h] seconds

positional arguments:
  seconds

options:
  -h, --help  show this help message and exit
  --show_time
```

A CLI class alone won't run anything, obviously. We need to define our behavior first.

### Define your CLI's behavior

#### Either use your CLI instance however you like...


```python

# main.py
...

cli = TerminalTimer()

for _ in range(cli.seconds):
    print(_)
    time.sleep(1)
```

#### ... or just put your logic within the `__call__()` method of your CLI class...


```python
class TerminalTimer(CLI):
    seconds: int
    show_time: bool

    def __call__(self):
        for _ in range(self.seconds):
            print(_)
            time.sleep(1)

TerminalTimer()  # That's it!
```

### Give your arguments default values to convert arguments to flags.

The `CLI` class will automatically convert arguments to flags if:
* they are assigned a default value,
* *or if the field is a boolean*.

For example, this...
```python
class TerminalTimer(CLI):
    seconds: int = 1
    show_time: bool
```
... will produce the following CLI:
```bash
$ python main.py --help
usage: main.py [-h] [--seconds SECONDS] [--show_time]

options:
  -h, --help         show this help message and exit
  --seconds SECONDS  (default: 1)
  --show_time
```

### Use the `Argument` class to further configure your CLI's arguments.

The `Argument` function takes the same arguments as the built-in `argparse.ArgumentParser.add_argument` function.


For example, this...

```python
from cli_buddy import CLI, Argument


class TerminalTimer(CLI):
    seconds: int = Argument(help="Number of seconds to wait")
    show_time: bool = Argument("-t", help="Show seconds in terminal", action="store_true")
```

... will produce the following CLI:
```bash
$ python main.py --help
usage: main.py [-h] -t seconds

positional arguments:
  seconds          Number of seconds to wait

options:
  -h, --help       show this help message and exit
  -t, --show_time  Show seconds in terminal
```
easydatastore 0.1.7
The easiest way to create type-safe, in-memory datastores for your models.
Requires Python: <4.0,>=3.11
Keywords: data validation, dataclasses, validation, models, meta-programming


# `easydatastore` - Create type-safe, in-memory datastores 

## Requirements
* Python 3.11+

## Install

```bash
pip install easydatastore
```

## Usage

If you want to prototype a web application quickly and just need a way to validate your mock data, you can use `easydatastore` to create an in-memory datastore for your models, directly out of the box.

### Features:

* In-memory tables for your models with `easydatastore.Table`, with a familiar pydantic-flavored syntax and ORM-like API.
* Enforce uniqueness constraints with `Column(unique=True)`
* Use indexing for faster lookups with `Column(index=True)`
* IDE-friendly type hints ensure your coding experience is type-safe.

### Example

```python
import easydatastore.exceptions
from easydatastore import Column, Table


class Person(Table):
    name: str = Column(primary_key=True)
    email: str | None = Column(unique=True, default=None)
    family_name: str
    age: int


Person(name="Snap", family_name="Krispies", email="snap@example.com", age=92)
Person(name="Crackle", family_name="Krispies", age=92)
Person(name="Pop", family_name="Krispies", age=92)
Person(name="Tony", family_name="Tiger", email="tony@example.com", age=72)
Person(name="Cap'n", family_name="Crunch", age=53)

# retrieve an instance from the table using the .get() method and a primary key value
tony = Person.get("Tony")
print(tony)  # Person(name='Tony', email=None, family_name='Tiger')

# or query your table using the .filter() method
print([person.name for person in Person.filter(family_name="Krispies")])  # ["Snap", "Crackle", "Pop"]
print([person.name for person in Person.filter(lambda person: person.age < 90)])  # ["Tony", "Cap'n"]

# delete instances from the table with the .delete() method
Person.delete(Person.get("Crackle"))
print([person.name for person in Person.all()])  # ["Snap", "Pop", "Tony"]

# easydatastore will validate uniqueness for you... these operations will raise exceptions:
try:
    tony.email = Person.get("Snap").email
except ValueError as e:
    print(e.args[0])  # ValueError: Value 'snap@example.com' for field 'email' is not unique

try:
    Person(name="Snap", family_name="Rice", age=1)
except easydatastore.exceptions.DuplicateUniqueFieldValueError as e:
    print(e.args[0])  # DuplicateUniqueFieldValueError

```