semvec/pypi-packages huggingface dataset:
architecture-as-code 0.0.14
Standardise and speed up application architecture design and deployments
Requires Python: >=3.6

# Architecture as Code

## Standardise and speed up application architecture and deployments

Architecture as Code is a Python package that allows you to standardise and speed up your application architecture design and deployments.

By populating a configuration file (in YAML format) that sets out each microservice in your application, you get 'three things for the price of one' - 1. automatically-generated docker run scripts, 2. automatically-generated Kubernetes deployment files, and 3. an automatically-generated architecture diagram.

Improve communication amongst your product team, make your devops folks happier, and shorten time-to-market!

![architecture as code](https://github.com/kg0809/architecture-as-code/blob/main/architecture-as-code.png?raw=true)

## Requirements

It requires Python 3.6 or higher, check your Python version first.

It uses [Graphviz](https://www.graphviz.org/) (via [Diagrams](https://diagrams.mingrammer.com/)) to render the diagram, so you first need to install Graphviz before using this package.

## Installation

Using pip:
`pip install architecture-as-code`

## Usage

Create a file called `config_main.yaml`, with the following example of a web application architecture comprising a front-end microservice, middleware microservice, and database:

```
# Environment config
kind: EnvironmentDetails
environments:

  - name: prod
    image_registry: 192.168.1.1:5000
    default_host: 192.168.1.2

---

# Service config
kind: ServiceDetails
services:

  - name: webapp-react-front-end
    containers:
    - name: react
      port_mappings:
      - target: 3000
      environment_variables:
      - name: WEBAPP_DJANGO_SERVICE_SERVICE_HOST
        
  - name: webapp-django
    containers:
    - name: django
      port_mappings:
      - target: 8000
      environment_variables:
      - name: WEBAPP_DB_SERVICE_SERVICE_HOST

  - name: webapp-db
    containers:
    - name: postgres
      port_mappings:
      - target: 5432
```

Next, run the following code in Jupyter / Python.  If you're not using Jupyter, omit the second and last lines.

```
from architecture_as_code import ArchitectureAsCode
from IPython.display import Image
prefix='WebApp'
aac = ArchitectureAsCode(prefix)
aac(config_main_file_name='config_main.yaml')
aac.generate_architecture_diagram()
Image(filename=prefix.lower() + '_architecture.png') 
```

You will then get three types of outputs:

1. Docker run scripts for each microservice will be generated in the `deployment_files/<environment name>` folder.
2. Kubernetes deployment files for each microservice will generated in the same folder above.
3. An architecture diagram will be created in the file name `webapp_architecture.png`
m9g 0.0.6
Define models for communication between components, handling MarshallinG (m9g)
Requires Python: >=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.5.*, <4
Keywords: marshalling serialize communication model

![Build Status](https://github.com/radiocutfm/m9g/workflows/Run%20tests/badge.svg)

## m9g : Define models for communication between components, handling MarshallinG (m9g)

### Usage


```python
import m9g
class Book(m9g.Model):
    id = m9g.IntField(pk=True)
    author = m9g.StringField()

book = Book(id=1, author="Hemingway")
book.serialize()  # JSON as default
'{"id": 1, "author": "Hemingway"}'
```


#### Complex types

```python
import datetime

class Author(m9g.Model):
    id = m9g.IntField(pk=True)
    authored_books = m9g.ListField(
            m9g.StringField()
    )
    birth_date = m9g.DateField()

author = Author(
    id=1,
    authored_books=[
            "The Torrents of Spring",
            "The Sun Also Raises",
            "A Farewell To Arms"
    ],
    birth_date = datetime.date(
            year=1899,
            month=7,
            day=21
    )
)
author.serialize()
'{"id": 1, "authored_books": ["The Torrents of Spring", "The Sun Also Raises", "A Farewell To Arms"], "birth_date": "1899-07-21"}'

```


## Contributing

### Run tests for python 2.7 / 3.6

```shell
    tox
```

### Run one-off test

```shell
    tox -- tests/<test_file>.py::<test_name>
```
fixedpivot 0.0.1b0
Fixed pivot method to solve population balance equations (PBE) for aggregation processes
Requires Python: >=3.6

# FixedPivot

`FixedPivot` is a Python implementation of the *(extended) fixed pivot method* to solve population balance equations (PBE) for one- and two-component aggregation processes. 

## Numerical method

If the system is spatially homogeneous, a two-component aggregation process is described by the following PBE:

<img src="https://latex.codecogs.com/svg.latex?\large&space;\begin{align*}&space;&&space;\frac{{\partial&space;n(x,y,t)}}{{\partial&space;t}}&space;=&space;\\&space;&&space;\frac{1}{2}\int_0^x&space;{\int_0^y&space;{\beta&space;(x&space;-&space;x',y&space;-&space;y';x',y';t)n(x&space;-&space;x',y&space;-&space;y',t)n(x',y',t)&space;d&space;x'&space;d&space;y'}}&space;\\&space;&&space;-n(x,y,t)\int_0^\infty&space;{\int_0^\infty&space;{\beta&space;(x,y;x',y';t)n(x',y',t)d&space;x'&space;d&space;y'}}&space;\end{align*}" title="\large \begin{align*} & \frac{{\partial n(x,y,t)}}{{\partial t}} = \\ & \frac{1}{2}\int_0^x {\int_0^y {\beta (x - x',y - y';x',y';t)n(x - x',y - y',t)n(x',y',t) d x' d y'}} \\ & -n(x,y,t)\int_0^\infty {\int_0^\infty {\beta (x,y;x',y';t)n(x',y',t)d x' d y'}} \end{align*}" />

For single component systems, the code implements the method of [Kumar & Ramkrishna (1996)](https://doi.org/10.1016/0009-2509(96)88489-2), and for bivariate aggregation the method of [Vale & McKenna (2005)](https://doi.org/10.1021/ie050179s).

##
turing_calculator 0.1.0
Simple calculator in python

# Simple Calculator

## What is this?

A pretty straight forward calculator for Python that can do the following:

* Stores current value of number until it is reset
* Addition / Subtraction
* Multiplication / Division
* Calculate nth root of a number

## Installation:

`pip install turing_calculator`

## Usage

`from turing_calculator import Calculator`
Initialise:
`calc = Calculator()`
Add 5 to current value:
`calc.add(5)`
Subtract 3:
`calc.subtract(3)`
Multiply by 25:
`calc.multiply(25)`
Divide by 2:
`calc.divide(2)`
Nth Root (In this case, square root):
`calc.root(2)`
Current Value:
`calc.val`
Reset to zero:
`calc.reset()`