semvec/pypi-packages huggingface dataset:
gladi 1.0.0
A simple dependency injection library for Python
Requires Python: >=3.12
Keywords: dependency, injection, di

# gladi

## Overview

Import the injector. This is the only import needed.

```py
from gladi import inject
```

The library provides 4 decorators:

- `@inject.singleton`: creates a singleton from a callable that instantiates the class in its return type
- `@inject.scoped`: same as singleton, but the callable gets called once per request
- `@inject.transient`: same as singleton, but it gets called on every request
- `@inject.resolve`: signals to the library that dependencies in parameters need to be resolved
	- using `@inject.singleton`, `@inject.scoped` or `@inject.transient` implies this

## Simple Usage

Assuming we have a class to inject,

```py
class Database: ...
```

create a function (or callable) with no user-provided arguments that returns a `Database` instance.

```py
def get_database() -> Database:
	return Database(
		host=...,
		port=...,
	)
```

Mark the callable with a decorator. In this case, a singleton would be appropriate.

```py
@inject.singleton
def get_database() -> Database: ...
```

`Database` class is now an injectable (as a singleton).

```py
async retrieve_user(
	user_id: int,
	database = inject(Database),
): ...
```

Lastly, signal that the `retrieve_user` function needs its dependencies to be resolved with the `@inject.resolve` decorator.

```py
@inject.resolve
async retrieve_user(
	user_id: int,
	database = inject(Database),
): ...

await retrieve_user(33)
```
inventree-stl-viewer 0.1.0
View STL files if provided as an attachment to a part
Requires Python: >=3.9
Keywords: inventree, plugin

# STLViewer

View STL files if provided as an attachment to a part

## Installation

### InvenTree Plugin Manager

Admins for the InvenTree instance can use the Admin panel to directly add the plugin, by using the package name `inventree-stl-viewer`.

### Command Line 

To install manually via the command line, run the following command:

```bash
pip install inventree-stl-viewer
```

Add  `inventree-stl-viewer` to your InvenTree server's `plugins.txt`.

## Configuration

Users can set their preferred STL model color in their user settings.

## Usage

The STL Viewer panel will automatically appear when looking at parts that have STL files as attachments!  There will be a tab for each STL file.
inventree-dxf-viewer 0.1.0
View DXF files if provided as an attachment to a part
Requires Python: >=3.9
Keywords: inventree, plugin

# DXFViewer

View DXF files if provided as an attachment to a part

## Installation

### InvenTree Plugin Manager

Admins for the InvenTree instance can use the Admin panel to directly add the plugin, by using the package name `inventree-dxf-viewer`.

### Command Line 

To install manually via the command line, run the following command:

```bash
pip install inventree-dxf-viewer
```

Add  `inventree-dxf-viewer` to your InvenTree server's `plugins.txt`.

## Configuration

No configuration is currently available for this plugin.

## Usage

The DXF Viewer panel will automatically appear when looking at parts that have DXF files as attachments!  There will be a tab for each DXF file.
private-project-windoows-snake-game 0.1.2
A Windows snake game project.It is a private project but you can use it if you trust me.
Requires Python: >=3.7



# Simple Snake Game 🐍

A minimalist snake game written in Python using `asyncio` and `pynput` for keyboard input.

---

## Author

* **userAnonymous**
* GitHub: [ramimK0bir](https://github.com/ramimk0bir)

---

## Installation

Install the game easily using pip:

```bash
pip install private-project-windoows-snake-game
```

---

## Usage



You can import and run the game from Python code:

```python
import private_project_windoows_snake_game as snake_game

snake_game.main(speed=5, food_emoji="🎮", grid_size=(20,20), block_emoji="▮")
```

---

## Parameters of `main` function

| Parameter     | Type            | Default | Description                                      |
| ------------- | --------------- | ------- | ------------------------------------------------ |
| `speed`       | int             | 5       | Controls the game speed (higher = faster).       |
| `food_emoji`  | str             | "🎮"    | Emoji to represent the food on the grid.         |
| `grid_size`   | tuple (int,int) | (20,20) | Size of the game grid as (width, height).        |
| `block_emoji` | str             | "▮"     | Emoji or character to represent the grid blocks. |

---

## Controls

* **Arrow keys** to move the snake:

  * Up arrow: Move up
  * Down arrow: Move down
  * Left arrow: Move left
  * Right arrow: Move right
* **Space bar** to pause or resume the game.

---

## How to Play

* The snake moves continuously on the grid.
* Eat the food (represented by the food emoji) to grow longer and increase your score.
* Avoid hitting the walls or the snake's own body.
* The game ends if you collide with yourself or the grid edges.
* Your current score is displayed above the grid.

---

## Notes

* The game uses ANSI escape codes for terminal control (clear screen, colors).
* Works best on terminals supporting Unicode and ANSI colors.
* Keyboard input requires the `pynput` package (automatically handled if installed via pip).
* If running the game script directly, make sure `pynput` is installed: `pip install pynput`.

---



## Troubleshooting

* If the game does not respond to key presses, ensure your terminal supports `pynput` keyboard listening.
* On Windows, you may need to run the terminal with administrator privileges for keyboard capture.
* If `pynput` is not installed, install it via `pip install pynput`.

---

## License

This project is open source. Feel free to contribute or modify!