semvec/pypi-packages huggingface dataset:
iocpy3 0.1.1
Simple ioc framework for python
Requires Python: >=3.11

# Simple Python IoC Framework

## Usage

Examples how to use this library.

### Singleton with no dependency's

Registering a singleton means we will return the same instance
for every `ioc.get` request.

```PYTHON
class MyInterface(ABC):
    @abstractmethod
    def do_it(self):
        ...

class MyClass(MyInterface):

    def __init__(self, name):
        self.name = name

    def do_it(self):
        print(f"{self.name} I did it")

ioc = IOCContainer()
ioc.register_singleton(MyInterface, MyClass("John Doe"))
ioc.get(MyInterface).do_it()
```

### Singleton with dependency's

Creating a singleton with dependency enables us to reuse already registered configurations.

⚠️ A singleton should only have singletons as dependency's if we use a transient, the transient will become a singleton.

```PYTHON

class AppConfig(BaseModel):
    user_name: str

ioc = IOCContainer()
ioc.register_singleton(AppConfig, AppConfig(user_name="John Doe"))
ioc.register_singleton(MyInterface, lambda x: MyClass(
    name=x.get(AppConfig).user_name)
    )
ioc.get(MyInterface).do_it()

```

### Transient

Registering a transient means we will generate the instance
for every `ioc.get` request.

```Python

class LoveCalculator():
    def __init__(self, name: str):
        self.name = name
        self.in_love_percent = random.randint(0, 100)

    def print(self):
        print(f"[{self.name}] -> {self.in_love_percent}%")

ioc = IOCContainer()
ioc.register_singleton(AppConfig, AppConfig(user_name="John Doe"))
ioc.register_transient(LoveCalculator, lambda x: LoveCalculator(
    name=x.get(AppConfig).username)
    )

ioc.get(LoveCalculator).print()
# output: John Doe -> 20%

ioc.get(LoveCalculator).print()
# output: John Doe -> 53%


```

### Scoped

Register a scoped resource this can be used to get the same instance every time as long as you are in the scope.
Another usage could be session aware stuff like opening and closing a db session within that scope.

```Python

class Database():
    def __init__(self, connection_string: str):
        self._cs = connection_string
        self._session_factory = SessionFactory()

    def get_session(self) -> Generator[Session, None, None]
        session = self._session_factory()
        try:
            yield session
        except:
            session.rollback()
        finally:
            session.close()


ioc = IOCContainer()
ioc.register_singleton(AppConfig, AppConfig(connection_string="Secret123"))
ioc.register_singleton(Database, lambda x: Database(
    connection_string=x.get(AppConfig).connection_string
    )
)
ioc.register_scoped(Session, lambda: x.get(Database).get_session)
ioc.register_transient(LoveCalculator, lambda x: LoveCalculator(
    db_session = x.get(Session)
))

#DB Session gets automatically closed when leaving the scope 
with ioc.create_scope() as scope:
    scope.get(LoveCalculator).print()



```

## Development

Run basic tests

```BASH
pdm test
```

Run coverage check

```bash
pdm coverage
```

Build and deploy

```BASH

pdm build
pdm publish
```
codeboot 0.0.4
Some tools to control codeBoot from Python and the shell
Requires Python: >=3.6

# codeboot-tools
Some tools to control codeBoot from Python and the shell

# Usage
```
usage: codeboot.py [FILES]... [OPTIONS]...

Execute Python scripts in the browser with codeBoot. Learn more about codeBoot
here: https://codeboot.org. Version 0.0.4.

positional arguments:
  A list of files or a directory to open in codeBoot. When a list of files
  is given, these are opened in codeBoot. When a directory is given, an html
  page that contains codeBoot links to all files in the directory is
  generated and opened.

execution options:
  -x, --exec                         execute in browser (default)
  -s, --step N                       single-step in browser up to N steps
  -a, --animate [{1,2,3,4}]          single-step animation in browser with
                                     given step speed (1=slow, 2=normal,
                                     3=fast, 4=ultra-fast)
  -n, --no-exec                      open in browser without executing
  -w, --webapp                       open as a webapp with editor hidden
  -e, --device                       execute on external device through
                                     codeBoot
  -l, --link-only                    print a hyperlink instead of opening in
                                     browser

help options:
  -h, --help                         show this help message and exit
  --version-info                     show program's version number and exit
  --warnings                         show warnings, including files that were
                                     skipped

server options:
  -d, --domain D                     use given domain (default to
                                     codeboot.org)
  -v, --version V                    use given codeBoot version (default to
                                     latest)

editor options:
  --large-font, --no-large-font      Enable/disable large font
  --line-numbers, --no-line-numbers  Enable/disable line numbers
  --floating, --no-floating          Enable/disable floating window
```
pyroll-elastic-mill-spring 3.0.1
Plugin for PyRolL incorporating the influence of the elastic mill spring.
Requires Python: <4.0,>=3.9

# PyRolL Elastic mill spring

PyRolL plugin calculating the influence of the elastic mill spring.

For the docs, see [here](docs/docs.pdf).

This project is licensed under the [BSD-3-Clause license](LICENSE).

The package is available via [PyPi](https://pypi.org/project/elastic-mill-spring/) and can be installed with

    pip install pyroll-elastic-mill-spring
aztp-client-python 0.1.0
AZTP (Astha Zero Trust Platform) Client Library for Python
Requires Python: >=3.8

# AZTP Client Python

AZTP (Astha Zero Trust Platform) Client is an enterprise-grade identity service client that provides secure workload identity management using SPIFFE (Secure Production Identity Framework for Everyone) standards. The client library facilitates secure communication between workloads by managing digital identities, certificates, and authentication.

## Installation

```bash
pip install aztp-client-python
```

## Quick Start

```python
from aztp_client import AztpClient

# Initialize client
client = AztpClient(api_key="your-api-key")

# Create a secure agent
agent = await client.secure_connect(name="service1")

# Verify identity
is_valid = await client.verify_identity(agent)

# Get identity details
identity = await client.get_identity(agent)
```

## Features

- Workload Identity Management using SPIFFE standards
- Certificate Management (X.509)
- Secure Communication
- Identity Verification
- Metadata Management
- Environment-specific Configuration

## Configuration

The client can be configured using environment variables:

```bash
AZTP_API_KEY=your-api-key
AZTP_BASE_URL=https://api.aztp.yourdomain.com
AZTP_ENVIRONMENT=production
```

Or programmatically:

```python
client = AztpClient(
    api_key="your-api-key",
    base_url="https://api.aztp.yourdomain.com",
    environment="production"
)
```

## Documentation

For detailed documentation, please visit [docs.aztp.ai](https://docs.aztp.ai).

## License

MIT License
aztp-client-py 0.1.0
AZTP (Astha Zero Trust Platform) Client Library for Python
Requires Python: >=3.8

# AZTP Client Python

AZTP (Astha Zero Trust Platform) Client is an enterprise-grade identity service client that provides secure workload identity management using SPIFFE (Secure Production Identity Framework for Everyone) standards. The client library facilitates secure communication between workloads by managing digital identities, certificates, and authentication.

## Installation

```bash
pip install aztp-client-python
```

## Quick Start

```python
from aztp_client_py import AztpClient

# Initialize client
client = AztpClient(api_key="your-api-key")

# Create a secure agent
agent = await client.secure_connect(name="service1")

# Verify identity
is_valid = await client.verify_identity(agent)

# Get identity details
identity = await client.get_identity(agent)
```

## Features

- Workload Identity Management using SPIFFE standards
- Certificate Management (X.509)
- Secure Communication
- Identity Verification
- Metadata Management
- Environment-specific Configuration

## Configuration

The client can be configured using environment variables:

```bash
AZTP_API_KEY=your-api-key
AZTP_BASE_URL=https://api.aztp.yourdomain.com
AZTP_ENVIRONMENT=production
```

Or programmatically:

```python
client = AztpClient(
    api_key="your-api-key",
    base_url="https://api.aztp.yourdomain.com",
    environment="production"
)
```

## Documentation

For detailed documentation, please visit [docs.aztp.ai](https://docs.aztp.ai).

## License

MIT License