semvec/pypi-packages huggingface dataset:
discord-lite 0.1.0
A lightweight Discord bot API library.
Requires Python: >=3.7
Keywords: discord bot discordbot lite discord-lite lightweight http websockets api

# discord-lite

![Python](https://img.shields.io/badge/Python-3776AB?style=for-the-badge&logo=Python&logoColor=white)
![PyPI](https://img.shields.io/badge/PyPI-3775A9?style=for-the-badge&logo=PyPI&logoColor=white)
![GitHub](https://img.shields.io/badge/github-%23121011.svg?style=for-the-badge&logo=github&logoColor=white)

Please check the wiki for how to use discord-lite!

https://github.com/yhg4908/discord-lite/wiki
api-service 0.0.5
This library will create and validate JWT tokens
Keywords: fastapi, bcrypt, jwt, pydantic

# Description of the Encryption Module

This module provides essential functionalities for secure authentication and password management in Python applications, particularly useful in web services developed with FastAPI. It is designed with a focus on security, efficiency, and ease of use.

## Features

### JWT Token Management

- `create_jwt_token(payload: dict)`: Creates a JWT (JSON Web Token) with a custom payload, typically including user details like ID and role. The token is encrypted using a secret key and an algorithm specified in the environment variables. It has a default expiration of 7 days.
- `check_token(token: str)`: Validates the given JWT token, verifying its integrity and authenticity. Returns `True` if the token is valid, otherwise `False`.
- `read_token_from_header(request: Request)`: Extracts and validates a JWT token from the HTTP request header. If the token is invalid or expired, it raises an `HTTPException` with appropriate status codes.
- `read_token(token: str)`: Validates a given string token. Raises an `HTTPException` if the token is invalid or expired, otherwise, returns the token's payload.

### Password Encryption and Verification

- `encrypt_password(password: str)`: Encrypts a plain password using bcrypt, providing a secure way to store passwords.
- `check_password(plain_password: str, hashed_password: str)`: Verifies a plain password against its hashed version, typically used during the login process.

This module is particularly suitable for web applications requiring robust authentication mechanisms and secure password handling.

# Description of the Query Module

This module is designed to handle and validate query strings in Python applications, especially in the context of web APIs developed using FastAPI and Pydantic. It focuses on flexibility and reliability in processing and validating query strings.

## Features

### Query String Decoding

- `decode_query(query: str)`: Decodes a query string into a dictionary. It can handle both URL-encoded JSON strings and standard query strings. For JSON strings, it parses them into a dictionary, and for standard query strings, it processes them as key-value pairs.

### Query Validation

- `decode_and_validate_query(query: str, validation_model: BaseModel)`: Decodes the given query string and then validates it against a specified Pydantic model. It ensures that the query matches the expected schema and data types.
- `validate_query_over_schema(validation_model: BaseModel, query: dict)`: Validates a dictionary (typically the result of a decoded query) against a Pydantic model. It checks if all fields in the query are contained in the model and match the expected types. If the query is incorrect, it raises an `HTTPException` with details of the discrepancy.
dataformathelper 1.0.0
A Python library for data format conversion, validation, and formatting.
Requires Python: >=3.7

# dataformathelper

`dataformathelper` is a Python library designed to simplify the conversion, validation, and formatting of common data types. Whether you're working with APIs, databases, or web applications, `dataformathelper` makes it easy to manage and transform data formats seamlessly.

## Features

- **Data Type Conversions**:
  - Convert JSON to CSV, XML, or YAML, and vice versa.
  - Support for nested structures.

- **Validation Utilities**:
  - Validate JSON against a schema.
  - Check for malformed CSV or XML data.

- **Formatting Tools**:
  - Prettify JSON, XML, and YAML.
  - Compress or minify JSON and XML.

- **File Handling**:
  - Read and write data in various formats with a simple API.
  - Detect file format automatically.

- **Custom Transformation**:
  - Apply user-defined transformations to data formats, such as renaming fields or applying filters.

## Installation

Install the latest version from PyPI:

```bash
pip install dataformathelper
```

## Usage Examples

### Convert JSON to YAML

```python
from dataformathelper.converter import json_to_yaml

json_data = {
    "name": "John",
    "age": 30,
    "city": "New York"
}

yaml_data = json_to_yaml(json_data)
print(yaml_data)
```

### Validate JSON Against a Schema

```python
from dataformathelper.validator import validate_json

schema = {
    "type": "object",
    "properties": {
        "name": {"type": "string"},
        "age": {"type": "integer"}
    },
    "required": ["name", "age"]
}

json_data = {"name": "Alice", "age": 25}

is_valid = validate_json(json_data, schema)
print("Valid JSON:", is_valid)
```

### Prettify JSON Data

```python
from dataformathelper.formatter import prettify_json

json_data = {"name": "Alice", "age": 25}
pretty_json = prettify_json(json_data)
print(pretty_json)
```

## Contributing

Contributions are welcome! Please follow these steps:

1. Fork the repository.
2. Create a new branch for your feature or bugfix.
3. Submit a pull request.

## License

This project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.

## Contact

For questions or suggestions, feel free to open an issue or reach out to the maintainer at `concise_sparsity287626@outlook.com`.
SmarTFUzz 0.0.5
SmarTFUzz
Requires Python: >=3.8

# URL Fuzzer

## Overview

**URL Fuzzer** is a Python-based terminal application designed to discover hidden or restricted URL paths by generating permutations of user-specified keywords. The tool performs requests using both HTTP and Selenium, extracting and analyzing data dynamically to discover new keywords for deeper fuzzing.

---

## Features

- **Dynamic URL Permutations**:
  - Generates URL paths using user-provided base words.
- **HTTP and Selenium Requests**:
  - Tests paths using `requests` for static content and Selenium for JavaScript-rendered pages.
- **Keyword Extraction**:
  - Dynamically extracts keywords from links, headers, and other content to refine search.
- **CLI Support**:
  - Fully configurable from the terminal with arguments for base words, max length, iterations, and more.

---

## Installation

### 1. Clone the Repository
```bash
git clone https://github.com/yourusername/url-fuzzer.git
cd url-fuzzer

pip install SmarTFUzz

pip install -r requirements.txt

chmod +x main.py
openlock 1.2.1
A Python locking library not depending on inter-process locking primitives in the OS
Requires Python: >=3.6

# openlock

A locking library not depending on inter-process locking primitives in the OS.

Consider a simple situation where multiple processes with the same working directory are trying to access a shared resource.

Create the lock.

```python
l = FileLock()
```

Acquire the lock.

```python
l.acquire()
```

Release the lock.

```python
l.release()
```

Alternatively we may use the context manager protocol.

```python
  with FileLock():
    ...
```

That's it!

For comprehensive documentation about `openlock` see [https://www.cantate.be/openlock](https://www.cantate.be/openlock) (canonical reference) or [https://openlock.readthedocs.io](https://openlock.readthedocs.io).
vcsparse 0.1.2
Generate fused and vectorizable kernels for sparse tensor programs on CPUs and GPUs
Requires Python: >=3.9

VCSparse: Generate fused and vectorizable kernels for sparse tensor programs on CPUs and GPUs. An web tool is available to try VCSparse online: [https://tongzhou80.github.io/vcsparse-web/index.html](https://tongzhou80.github.io/vcsparse-web/index.html).

**More technical detals are to be added!**

# Installation

```bash
pip install vcsparse
```

# Quick introduction

To compile a function with `vcsparse`, all you need to do is to add *index notation* to the function arguments, 
and decorate the function with `@vcsparse.compile`. Here's an example:

```python
@vcsparse.compile(full_opt=True)
def mul_then_rowwise_sum(A: Tensor('i,j', 'csr'), B: Tensor('i,j', 'csr')):
    return (A * B).sum(1)
```

The option `full_opt=True` will enable all optimization passes. The directory `tests/` contains many code examples of using VCSparse, feel free to check them out.

# Note
Currently only a CPU backend (via Numba) is implemented. A GPU backend (via APPy) is under development.