Skip to main content

# Tamplar

Tamplar is service generator. This project can to help you control your development. We think, you should development with isolated environment. Therefore we creates docker-compose for local debugging and testing.

Now, we use [this](https://github.com/U-Company/python-service-layout) python layout.

# Installing

pip install tamplar

If you want local environments, you need a docker. Please install:

sudo apt-get install docker.io

We don’t use docker-compose as console util. We build docker-compose from source and we use docker API into python code.

# Usage

tamplar can work with:

  • pip

  • publishing package to pypi registry

  • publishing docker to docker registry

  • docker-compose for local development

# Console running

### Init

Go to empty directory and init your first project

tamplar init

After that, you get [FastAPI](https://fastapi.tiangolo.com/) service with healthcheck methods. FastAPI is ASGI framework instead of [Flask](https://flask.palletsprojects.com/).

If you want reinitialize, tamplar ask you about cleaning repo. If you works with JetBrains IDE, while initialization we ignore .idea files.

### Deps

We use default excellent library for logging. This is [loguru](https://github.com/Delgan/loguru). Loguru is a very useful wrapper over standart python [logger](https://docs.python.org/3.8/library/logging.html). After initilize you can install all dependencies:

tamplar deps

This command uses pip and requirements.

### Upload (Not implemented)

You can upload your package to concrete pypi registry and docker registry

tamplar upload –docker=True –pypi=True –namespace=<your-namespace from .pypirc>

After that, it built your docker image, pypi registry and push to the registry with latest version from info.py. Registry is selected by namespace parameter.

### Validate (Not implemented)

This command checks struct of project by [python-service-layout](https://github.com/U-Company/python-service-layout).

tamplar validate

### Run full

This command build and run docker with services with environment (dependencies of services)

tamplar run –mode=full

We implement execute docker-compose by python library docker-compose internal API. After run, it run docker-compose file or you get status code error

### Run env

This command build and run docker WITHOUT services with environment (dependencies of services)

tamplar run –mode=env

We implement execute docker-compose by python library docker-compose internal API. After run, it run docker-compose file or you get status code error

### Clean

Clean is command for cleaning your building files:

tamplar clean

# Dependency

If you want to add new service as dependency, you need to go to the deployment/docker-compose.*.yml. After that, you need new service to your docker-compose files.

# Test

Tamplar have a lot of good tests. But we have not any integration tests, because it is very difficult emulate python’s environment. Therefore we change integration tests to unit tests mixed integration tests (we creates and deletes files) while tests:

make test

If you want to execute test from IDE, you need to go tests/__init__.py and change deep=2.

Metadata

Release files for tamplar 0.5.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for tamplar 0.5.1
File Interpreter ABI Platform Actions
tamplar-0.5.1-py3-none-any.whl Python 3 none any Details for tamplar-0.5.1-py3-none-any.whl

Release files / tamplar-0.5.1-py3-none-any.whl

Download URL tamplar-0.5.1-py3-none-any.whl
Size 13.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9c0aa43746c5c6ffe70194a16994bc673e9109e92bf79c9c6d118839ab5153c1
BLAKE2b-256 checksum
How to use checksums
e1b4380a0d0a3b09b07949ef89350a89a6f6987bade44b309523c9b8e59268f5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via Python-urllib/3.7

Security for tamplar 0.5.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.5.1 This release

1 release file No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page