semvec/pypi-packages huggingface dataset:
myfy-commands 0.1.2a94
CLI commands module for myfy framework
Requires Python: >=3.12

# myfy-commands

CLI commands module for the myfy framework.

## Installation

```bash
pip install myfy-commands
```

## Usage

```python
from myfy.core import Application
from myfy.commands import CliModule, cli

@cli.command()
async def seed_users(user_service: UserService, count: int = 10):
    """Seed the database with test users."""
    for i in range(count):
        await user_service.create(f"user{i}@example.com")

app = Application()
app.add_module(CliModule())
```

Run commands with:

```bash
myfy app seed-users --count 20
```

## Command Groups

```python
from myfy.commands import cli

db = cli.group("db")

@db.command()
async def seed(db: Database):
    """Seed the database."""
    await db.seed()

@db.command()
async def reset(db: Database, force: bool = False):
    """Reset the database."""
    if force:
        await db.reset()
```

Run grouped commands:

```bash
myfy app db:seed
myfy app db:reset --force
```
myfy-cli 0.1.2a94
CLI tools for myfy framework
Requires Python: >=3.12

# myfy-cli

CLI tools for the myfy framework.

Commands:
- `myfy run` - Start development server
- `myfy routes` - List all routes
- `myfy modules` - Show loaded modules
- `myfy doctor` - Validate configuration

See the [main README](../../README.md) for documentation.
myfy-core 0.1.2a94
Core kernel for myfy framework - DI container, configuration, and module system
Requires Python: >=3.12

# myfy-core

Core kernel for the myfy framework.

Provides:
- Dependency injection with compile-time resolution
- Configuration system with profiles
- Application kernel and module system
- Lifecycle management

See the [main README](../../README.md) for documentation.
ndif 0.0.1
The NDIF server, which performs deep inference and serves nnsight requests remotely
Requires Python: >=3.12

# NDIF Development Guide

This guide explains how to set up a development environment, install dependencies, and get started with contributing to the `NDIF` project.

## Prerequisites

- Python 3.10
- Docker
- Docker Compose


## Setup

## 1. Install Conda
If you don’t have Conda installed, download and install Anaconda or Miniconda from the [official Conda website](https://docs.conda.io/en/latest/miniconda.html).

## 2. Create Conda Environment

Fork the `NDIF` repository (or clone it directly) to your local machine. Then create a new Conda virtual environment:

```sh
conda create -n ndif-dev python=3.10
conda activate ndif-dev
```

## 3. Install NNsight 

Choose one of the following methods:

a. Via pip (simple)

```
pip install nnsight
```

b. From repository (recommended for specific branches)

```sh
git clone https://github.com/nnsight/nnsight.git
cd nnsight
git checkout <branch-name>  # e.g., 0.3
pip install -e .
```

## Building and Running `NDIF`

### 1. Build and start the development environment

For first-time setup, use:

```sh
make build
```

If you’ve made changes to the codebase but did not modify the `environment.yml` files, you can quickly rebuild the services using:

```sh
make ta
```

This method is faster than running `make build` again.

### 2. Verify server status

After building the `NDIF` containers, you can check the docker logs to verify the services are running correctly.
```sh
docker logs dev-api-1
```
You should expect to see a message like `Application startup complete.` in the api service log.

### 3. Run tests

```sh
python scripts/test.py
```

For more comprehensive testing, install [pytest](https://docs.pytest.org/en/stable/)


Navigate to the service you wish to test
```sh
cd src/services/api
pytest
```


This will send a test NNsight request to the API service running in the local container.

## Additional Commands

- To start the deployment environment without rebuilding:

```sh
make up
```

- To stop the development environment:

```sh
make down
```

- To rebuild services and restart the environment (useful during development):

```sh
make ta
```

_Note: Modifying any of the `environment.yml` files will require you to rebuild from scratch._

# Environment Configuration

The project uses separate `.env` files for development and production environments:

- Development: `compose/dev/.env`
- Production: `compose/prod/.env`

For most users, only the development environment is necessary. The production environment is configured separately and is not required for local development.

### Note

The Makefile includes configurations for both development and production environments. As an end user or developer, you'll primarily interact with the development environment. The production environment settings are managed separately and are not typically needed for local development work.
staticlib 0.1
A module for creating static instance objects.
Requires Python: >=3.12

                ███████╗████████╗ █████╗ ████████╗██╗ ██████╗██╗     ██╗██████╗ 
                ██╔════╝╚══██╔══╝██╔══██╗╚══██╔══╝██║██╔════╝██║     ██║██╔══██╗
                ███████╗   ██║   ███████║   ██║   ██║██║     ██║     ██║██████╔╝
                ╚════██║   ██║   ██╔══██║   ██║   ██║██║     ██║     ██║██╔══██╗
                ███████║   ██║   ██║  ██║   ██║   ██║╚██████╗███████╗██║██████╔╝
                ╚══════╝   ╚═╝   ╚═╝  ╚═╝   ╚═╝   ╚═╝ ╚═════╝╚══════╝╚═╝╚═════╝ 
                                                                                
--- 

> _**StaticLib** is a module that provides a single class for defining a static object._

> _There're two option for a StaticObject instance:_

>   _**freeze_value=True**: the value declared within the StaticObject instance is immutable._

>   _**freeze_value=False**: the value declared within the StaticObject instance is mutable._

> _For values to become mutable, the freeze_value option have to be set to True during object instanciation._

> _The value can them be modified by invoking the 'modify' method._

> _A type that is declared during object instanciation is always immutable, meaning it can never be changed._


## Examples:
```python
from StaticLib import StaticObject

# Unmodifiable
user: StaticObject = StaticObject(str, "Admin", freeze_value=True)

if hasattr(user, "error"):
    raise user.error
else:
    print(user.value)

# Trying to modify the value results in an error
# if user.modify("Hello") is False:
#    raise user.error    # we'll see this error
# else:
#    print(user.value)

##################################################################

# Modifiable
age: StaticObject = StaticObject(int, 22, freeze_value=False)

if hasattr(age, "error"):
    raise age.error
elif not age.modify(15):
    raise age.error
else:
    print(age.value)


# The instance object can be viewed as a string representation using the 'view' method
print(user.view())
print(age.view())


###################################################################
# When using StaticLib the None type is replaced with a custom type named Null
# which can be imported and used as a type and a value without the hassle of using None
# as it isn't considered a type and doesn't work well with isinstance. The name of the
# Null type is StaticNull where Null is its alias.
```