semvec/pypi-packages huggingface dataset:
singletondep 0.1.1
simple singleton dependency management
Requires Python: >=3.10
Keywords: singleton,dependency

singletondep
------------

Fully typed dependency management library focusing simplicity and flexibility.

## Motivation

This library aims to provide a simple approach to singleton dependency
management in projects. In modern live systems, there can be many objects that
are expensive and hard to control background tasks, connections, pools
life-cycles.

Frameworks either have a very opinionated view on this, or rely on module-level
defined objects which may require dynamic parameters that are injected during
application startup. This causes module structures to access global variables
or importing completely unrelated modules in order to manage singleton
dependencies lifecycles applying anti-patterns all around.

This library provides a simple approach to this problem by using simple
abstraction over raw functions.

## Requirements

python >= 3.10

### Installation

```sh
pip install singletondep
```

### Usage

```python
from singletondep import singletondep

@singletondep
async def get_db(db_url: str):
    db = Database(settings.db_url)
    await db.connect()
    print("connection established")
    yield db
    await db.disconnect()
    print("disconnected from db")


async def main():
    db_url = "localhost/db_name"
    await get_db.init(db_url)
    # out: connection established
    db = get_db()
    ...
    await get_db.cleanup()
    # out: disconnected from db
```

This library can be especially useful to manage dependencies in larger projects.


### Using as a FastAPI Dependency

```python
import os

from fastapi import FastAPI, APIRouter, Depends
from pydantic import BaseSettings
from singletondep import singletondep
from singletondep.ext.fastapi import register_dep


class Settings(BaseSettings):
    url: str


@singletondep
async def get_db(settings: Settings):
    db = await create_connection(settings.url)
    print("connected to db")
    yield db
    await db.disconnect()
    print("closed db connections")


router = APIRouter()

@router.get("/meaning")
def get_meaning(db = Depends(get_db)):
    meaning = await db.fetch_meaning()
    return f"the meaning is {meaning}"


def create_app() -> FastAPI:
    app = FastAPI()
    app.include_router(router)
    settings = Settings(url=os.environ["url"])
    register_dep(get_db, app, settings)
    return app
```
flask-autoinject 2.0.2
Flask support for dependency injection with autoinject
Requires Python: >=3.7

# Flask AutoInject

Flask integration to provide separate contexts 
for each request regardless of the underlying 
WSGI handler.

As of version 1.1.0, you MUST use the `init_app()` function
to properly use `autoinject` with Flask contexts. Previously,
the informant was registered automatically. Calling `init_app()` 
now (as of 2.0.0) uses the new contextvars integration in `autoinject`
by wrapping the call to wsgi_app() in an `autoinject.with_contextvars()`
decorator. This ensures that injected functions are cleaned up when the call
to wsgi_app() ends and prevents any ordering problems in terms of the 
teardown functions.

Note that this module does not provide management of autoinjected variables
outside of the context of a call to wsgi_app() (essentially from app config push to 
teardown). Any other management you will need to provide yourself.

```python
import flask
import flask_autoinject

app = flask.Flask(__name__)
flask_autoinject.init_app(app)
```
tlqb-tools 0.0.2
WHAT IS THE REASON YOU BUILD THIS PROJECT AND WHAT IT DOES
Requires Python: >=3.6

## TLQB TOOLS
Test publish module to pypi ...

## INSTALLATION
Currently it is only supported Python3 onwards. It can be installed through pip:
```shell
pip install tlqb_tools
```

## USAGE
The following example illustrates the ease of use of this package:
```python
from tlqb_tools import tlqb
tlqb.sum_func(10,20)
```

## LICENSE
nrmk-clients 0.1.0
A gRPC client for EtherCAT communication tasks
Requires Python: >=3.6

- # ecat_grpc_client

`ecat_grpc_client` is a Python package that provides a gRPC client for EtherCAT communication tasks. This package simplifies the interaction with EtherCAT devices by providing an easy-to-use API for various EtherCAT-related operations.
## Installation

To install `ecat_grpc_client`, simply run:

```bash
pip install ecat_grpc_client
```


## Dependencies

The `ecat_grpc_client` package depends on the following libraries:
- grpcio

Make sure you have them installed in your Python environment.
## Usage

Here's a quick example to get you started:

```python
import sys
from ecat_grpc_client import GRPCECatTask as ecat_client
import sys, json, grpc, time
from motordriver_utils import *

ecat = ecat_client('192.168.214.20') # ecat
```



For more detailed usage instructions, refer to the [API documentation](https://chat.openai.com/chat/link-to-api-docs) .
## API Overview

The `ecat_grpc_client` package provides a `GRPCECatTask` class with the following methods:
- `get_master_status()`
- `get_slave_status()`
- `get_rxdomain_status()`
- `get_txdomain_status()`
- `is_system_ready()`
- `set_servo(slave_idx, state)`
- `set_md_rx_pdo(slave_idx, controlWord, modeOp, targetPos, targetVel, targetTor)`
- `get_md_rx_pdo(slave_idx)`
- `get_md_tx_pdo(slave_idx)`
- `get_md_di(slave_idx)`
- `get_error_code(slave_idx)`
- `get_max_torque(slave_idx)`
- `get_max_motor_speed(slave_idx)`
- `set_max_torque(slave_idx, value)`
- `set_max_motor_speed(slave_idx, value)`
- `get_ioboard_do()`
- `get_ioboard_di()`
- `set_ioboard_do(do_idx, do_val)`
- `set_ioboard_dos(do_vals)`
- `reset_welcon(slave_idx)`
- `get_error_code(slave_idx)`
- `get_core_temp1(slave_idx)`
- `get_core_temp2(slave_idx)`
- `get_core_temp3(slave_idx)`
- `get_maxTorque(slave_idx)`
- `get_profileVel(slave_idx)`
- `get_profileAcc(slave_idx)`
- `get_profileDec(slave_idx)`
- `set_maxTorque(slave_idx, value)`
- `set_profileVel(slave_idx, value)`
- `set_profileAcc(slave_idx, value)`
- `set_profileDec(slave_idx, value)`
## License

This project is licensed under the MIT License. See the [LICENSE](https://chat.openai.com/chat/LICENSE)  file for details.
## Contributing

We welcome contributions! If you would like to improve this package or report any issues, please open a pull request or create an issue on the GitHub repository.
## Contact

For questions or suggestions, please contact the package author at `youngjin.heo@neuromeka.com`.