semvec/pypi-packages huggingface dataset:
hap83334 4.0.0
Simple rekor tool for assignment 4
Requires Python: >=3.10

# Python Rekor Verifier

Introducing a powerful command-line tool explicitly designed for efficiently querying and verifying entries in a Rekor transparency log. With this tool, you can seamlessly fetch log entries, confidently verify inclusion proofs, and reliably check the consistency of the log's Merkle tree.

## Description

This project offers a robust client for interacting directly with a Rekor server (e.g., `https://rekor.sigstore.dev`).

### Key Features

- Effortlessly fetch log entries by index.
- Unquestionably verify artifact signatures using public keys from log entries.
- Conduct inclusion proof verification to ensure that an entry is securely within the log.
- Guarantee consistency between an old tree state and a new one with absolute confidence.

## Installation

1. Install the required dependencies:
    ```bash
    pip install poetry
    poetry install
    ```

## Usage

Harness the power of this tool directly from the command line.

### Get Latest Checkpoint

Easily retrieve the latest signed tree head (checkpoint) from the Rekor server:
```bash
python main.py --checkpoint
```

### Verify Inclusion

Confidently verify that an artifact is included in the log at a specified index. Simply provide the log index and the path to the original artifact:

```bash
python main.py --inclusion <LOG_INDEX> --artifact <PATH_TO_ARTIFACT>
```

**Example:**
```bash
python main.py --inclusion 12345 --artifact ./my-file.txt
```

### Verify Consistency

Ensure that your previously known checkpoint is consistent with the latest checkpoint. Gather the `treeID`, `treeSize`, and `rootHash` from the old checkpoint for this verification:

```bash
python main.py --consistency --tree-id <TREE_ID> --tree-size <OLD_TREE_SIZE> --root-hash <OLD_ROOT_HASH>
```

**Example:**
```bash
python main.py --consistency --tree-id 238498... --tree-size 1000 --root-hash abcdef123...
```

### Debug Mode

For detailed and verbose output for any command, confidently use the `--debug` or `-d` flag:
```bash
python main.py --checkpoint --debug
```

Get ready to take control of your log verification processes with the Python Rekor Verifier!
aiosatisfactory 0.1.4
Async client for Satisfactory dedicated server APIs
Requires Python: >=3.10

# aiosatisfactory

This is an async Python library for Satisfactory dedicated server's APIs.

This work is based off the official documentation that is provided with the game files or is also available on the official [wiki](https://satisfactory.wiki.gg)

## Lightweight API [(docs)](https://satisfactory.wiki.gg/wiki/Dedicated_servers/Lightweight_Query_API)
This API should be used to poll the server state before making most of the https requests \
No errors are raised but you must check if the query was succesful

### Usage:
```python
from aiosatisfactory import SatisfactoryServer
import asyncio, time

async def main():
    server = SatisfactoryServer("server.ip")
    query = await server.lightweight.query(time.time_ns())
    print(query.response.SubStates)

asyncio.run(main())
```

## Https API [(docs)](https://satisfactory.wiki.gg/wiki/Dedicated_servers/HTTPS_API)
This API requires the *session* parameter to be set in the *SatisfactoryServer* constructor \
It does raise an *ErrorResponse* exeption if the function you try to execute fails

### Usage:
```python
import asyncio, aiohttp
from aiosatisfactory import SatisfactoryServer
from aiosatisfactory.https.models import ErrorResponse

async def main():
    async with aiohttp.ClientSession() as session:
        client = SatisfactoryServer("server.ip", session=session)
        try:
            response = await client.https.api.health_check()
            print(response.health)
        except ErrorResponse as e:
            print(f"Error: {e.error_code, e.error_message, e.error_details}")

asyncio.run(main())
```

## Mappings
The Https API provides the value of *active_schematic* and *game_phase* as some internal strings, this class provides translations to the proper display names

### Usage:
```python
import asyncio, aiohttp
from aiosatisfactory import SatisfactoryServer
from aiosatisfactory.https.models import ErrorResponse

async def main():
    async with aiohttp.ClientSession() as session:
        client = SatisfactoryServer("server.ip", session=session, api_token="your_api_token")
        try:
            response = await client.https.api.query_server_state()
            print(client.mappings.game_phase(response.game_phase))
            print(client.mappings.schematic(response.active_schematic))
        except ErrorResponse as e:
            print(f"Error: {e.error_code, e.error_message, e.error_details}")

asyncio.run(main())
```