Metadata-Version: 2.1
Name: silvera
Version: 0.3.1
Summary: Tool for generating microservice architectures.
Home-page: https://github.com/alensuljkanovic/silvera
Author: Alen Suljkanovic
Author-email: alienized91@gmail.com
License: MIT
Keywords: microservices dsl generator compiler
Platform: UNKNOWN
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Information Technology
Classifier: Intended Audience :: Science/Research
Classifier: Topic :: Software Development :: Interpreters
Classifier: Topic :: Software Development :: Compilers
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: textx
Requires-Dist: jinja2
Requires-Dist: click

# Silvera

Silvera is a declarative language for modeling microservice
architectures based on [textX](https://github.com/textX/textX), and it is designed
in a way that directly implements domain-related design patterns.

Silvera is:

* lightweight and editor-agnostic language - you can use text editor of your choice to write Silvera programs.
* built with heterogeneity in mind - Silvera's compiler can produce code for any programming language or framework since
  [code generators are registered as plugins](https://alensuljkanovic.github.io/silvera/custom_generator/).

In addition, Silvera uses microservice-tailored metrics to evaluate the architecture
of the designed system and automatically generates the documentation. 
Architecture Evaluation Processor comes with a set of 
[predefined metrics](https://alensuljkanovic.github.io/silvera/evaluation-metrics/), 
but you can also [add your own!](https://alensuljkanovic.github.io/silvera/custom_evaluator/).

Silvera is fully implemented in Python.

# Quick intro

Here is a small example where we define a service registry and one microservice.

```
# setup.si

service-registry ServiceRegistry {
	client_mode=False
	deployment {
		version="0.0.1"
		port=9091
		url="http://localhost"
	}
}
```

```
import "setup.si"

service Bookstore {

    service_registry=ServiceRegistry

    api {

        @crud
        typedef Book [
            @id str isbn
            @required str title
            @required str author
            str category
            @required double price
        ]

        @rest(method=GET)
        list<Book> listBooks()

        @rest(method=GET)
        bool bookExists(str isbn)

        @rest(method=GET)
        double bookPrice(str isbn)
    }

}
```


## Installation

You can use `pip` to install Silvera:

```
$ pip install silvera
```

To verify that you have installed Silvera correctly run the following command:

```
$ silvera
```

You should get output like this:

```
Usage: silvera [OPTIONS] COMMAND [ARGS]...

Options:
  --debug  Debug/trace output.
  --help   Show this message and exit.

Commands:
  check            Checks if created model is valid.
  compile          Compiles application code into to provided output...
  evaluate         Evaluates the architecture for given project.
  init             Creates initial Silvera project
  list-generators  Lists all currently available code generators
  visualize        Visualize the architecture for given project.
```


## Feature highlights

* **Designed patterns directly implemented in language**

* **Project modularization - imports**

* **Project evaluation based on metrics**

* **Automatic code generation**

* **Support for custom code generators via plugins**


## User guide

For documentation and tutorials, visit docs: https://alensuljkanovic.github.io/silvera/


## Python versions

Tested with Python 3.7.4+


