semvec/pypi-packages huggingface dataset:
hexagonal-coherence-check 0.0.22
Hexagonal Coherence Check
Requires Python: >=3.7,<4.0
Keywords: hexagonal architecture,onion architecture,enforce rules,coherence check

# Hexagonal Coherence Check

This project checks if the dependency flow between the layers of the Hexagonal architecture defined 
for this project was respected.

### How to install

It can be easily installed via pip: `pip install hexagonal-py`

### How to configure your project

First it's necessary to define your hexagonal layers and their order.
The tool expects a default file name on your source folder dir with the name `hexagonal_config.py`.

1. First you create the Hexagonal Layers you have on your system via the class name HexagonalLayer.
There are two arguments: 
   - `name`: It can be any name, `domain`, `frontend`, `infrastructure`, or any name you used for your layers.
   - `usecases`: This is the name of the directory the files related to this layer as storage. It's not the full path, 
it's the directory name relative path from source.

2. Import `hexagonal_config` on your file, and define the order with `+` (add layers)
then `>>`(set the sequence of the layers). The most to the left layers is the most outer layer, while
the most to the right layer is the most inner layer.

Example, for this folder structure:
```
. src
├── __init__.py
├── hexagonal_config.py
├── domain
│   ├── __init__.py
│   ├── __pycache__
│   └── person.py
├── infrastructure
│   ├── __init__.py
│   └── person_mysql_repository.py
├── main.py
├── services
│   ├── __init__.py
│   └── person_repository.py
└── usecases
    ├── __init__.py
    └── create_person_usecase.py
.tests    
```
The file:

```python
from hexagonal.domain.hexagonal_layer import HexagonalLayer
from hexagonal.hexagonal_config import hexagonal_config

hexagonal_config.add_inner_layer(HexagonalLayer(name='infrastructure', directories=['/infrastructure']))
hexagonal_config.add_inner_layer(HexagonalLayer(name='use_cases', directories=['/use_cases']))
hexagonal_config.add_inner_layer(HexagonalLayer(name='services', directories=['/services']))
hexagonal_config.add_inner_layer(HexagonalLayer(name='domain', directories=['/domain']))

hexagonal_config.excluded_dirs = ['/tests']
```


### Generating the Project Diagram
This command generate a visual diagram show the composition of your hexagonal layers.

#### Pre requisites
To generate the Hexagonal Diagram of the project, it's necessary to have Graphviz installed in the machine.  
For Mac you can ``brew install graphviz``.  
For other, check the documentation https://graphviz.org/download/. 

#### CMD
`hexagonal diagram --source_path ./` 

### Checking Project's Hexagonal Integrity 
This checks if the correct flow of the dependencies -from outer to inner layer- was respected.

#### CMD
`hexagonal check --source_path ./`
torus-cli 1.3.0
Command line interface for torus-engine
Requires Python: >=3.8

# torus-cli

## Description

Command line interface for `torus-engine`: showcases the various functionality of the ASCII rendering engine.

## Install

### Download using pip

Open your terminal and type:

> `pip install torus-cli`

You can find more information on the package on PyPI by clicking [here](https://pypi.org/project/torus-cli/#description).

### Launch the CLI

In your terminal, you can simply launch `main.py`as follow:

> `cd torus-cli`
> `python3 src/toruscli/main.py`

And the program will laucnh in the current terminal window.

#### Help

While the program is running, you can control several aspects of the scene. To know more about what you can do, run:

> `python3 src/toruscli/main.py -h`

## 🛠 Improvments
Feel free to create an issue or a pull request in case you find bugs or want to add a feature!
torus-engine 1.5.0
3D ASCII character rendering engine
Requires Python: >=3.7

# torus-engine

## Description

Basic ASCII 3D rendering engine on the terminal.

## Install

### Download using pip

Open your terminal and type:

> `pip install torus-engine`

You can find more information on the package on PyPI by clicking [here](https://pypi.org/project/torus-engine/#description).

### Import to your Python project

In your Python project, add this line at the top of the file you wish to have access to the `torus-engine` package:

### Tutorial

Let's go through a simple tutorial that showcases the different essential functionalities of the `torus-engine` API.

#### Creating an object, `Torus`

You can choose which object you want to render. See `torusengine/objects` for the different objects available. Alternatively, you can create your own, as long as it satisfies the requirements.

```{.Python}
import torusengine.objects.orus import Torus

torus = Torus()
```

#### Adding a light source, `Light`

Then you can add a light source:

```{.Python}
import torusengine.light import Light

light_source_position = (2, 1, 0) # (x, y, z) coordinates
light_source = Light(position=light_source_position)
```

#### Placing a `Camera`

You also need a camera. To do that you can follow the code below:

```{.Python}
import torusengine.camera import Camera

camera_point = (1, 0, 0) # (x, y, z) coordinates
camera = Camera(camera_position=camera_point)
```

`Camera` takes as optional parameters `point_to_fix`, which is where the camera is pointing (`(0, 0, 0)` by default), and `horizontal_rotation` which determines the tilt of the camera.

#### Putting it altogether to create a `Scene`

You can now create a `Scene`, by passing the object, the light source and the camera:

```{.Python}
import torusengine.scene import Scene

scene = Scene(torus, light_source, camera)
```

`Scene` can also take the `fps` parameter (frames per second), which is set to 5 by default.

With the object `scene` instantiated, you can now call its `start()` method:

```{.Python}
scene.start()
```

It can take as parameter the boolean `static` (set to `False` by default), which determines whether to update the scene only once, or to update it conitnuously (according to its `fps` value).

Additional methods of the class `Scene` can be called, to change the camera (by moving it up, down, left or right), to increase or decrease the light source intensity, or even to change the object being rendered altogether.

## 🛠 Improvments
Feel free to create an issue or a pull request in case you find bugs or want to add a feature!