Skip to main content

Refit

Documentation Status

Simple remote server configuration and deployment, using asyncio. Read the Docs.

Why Refit?

As a die hard Ansible user for many years, I started looking for something slightly different.

Because of Docker, most of my deployments have become simpler. It usually involves uploading some files (e.g. docker-compose.yaml), and running some shell commands (e.g. docker-compose up). As a result, I don't need most of the modules that Ansible provides.

One thing I originally found great about Ansible was being able to configure it purely in YAML. This is nice when you're getting started. As your projects get larger though, you yearn for the control that code gives you. For example, rather than having to learn the particular syntax for performing 'for loops' in YAML, just do it naturally in Python.

Ansible is still great - but if you want to work in Python rather than YAML, give Refit a go.

Isn't it all about serverless nowadays?

Configuring servers is still a daily reality for many people, and will continue to be so for the foreseeable future. Need websockets? Can't stand the slow start up times of serverless? Want to avoid vendor lock in? Using VMs still makes a lot of sense.

Why asyncio?

Asyncio is a new approach to concurrency which was added in Python 3. It uses an event loop, rather than threads or processes. A typical use case is building a proxy, or a higher throughput web application.

It turns out that asyncio also works great for remote server configuration too. The reason is, your typical server config work flow looks a bit like this:

   MACHINE A          MACHINE B
   ---------          ---------
(TASK A1, TASK A2)     TASK B1
       |                  |
    TASK A3               |
                       TASK B2

Using async, we can fire off tasks A1, A2, and B1 simultaneously. Once complete, we then fire off task A3, and finally task B2. Refit will orchestrate the tasks so the servers are provisioned as quickly as possible.

It also means you can use all the exciting new asyncio libraries within your code.

Props

Built on top of the great work done in asyncssh.

Metadata

Release files for refit 0.3.0

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

Source distribution (sdist)

Source distribution for refit 0.3.0
File Size Uploaded
refit-0.3.0.tar.gz 12.3 kB Details

Built distribution (wheel)

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

Total release size: 29.8 kB

Release files / refit-0.3.0.tar.gz

Download URL refit-0.3.0.tar.gz
Size 12.3 kB
Tags Source
SHA-256 checksum
How to use checksums
d378481be669d77f857356dc754414168877f7349f492f9adb106a02fa8c7c36
BLAKE2b-256 checksum
How to use checksums
acee4102f2324e2cdac7f508bab83670f6a906ad235522b3b0f6c6cd81296d71
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.8.1

Release files / refit-0.3.0-py3-none-any.whl

Download URL refit-0.3.0-py3-none-any.whl
Size 17.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
fd805355d6dd33e81fc4375721e9b5ac3c684fd966c162186bde8d07636dc192
BLAKE2b-256 checksum
How to use checksums
9566d5a28c958b502128457b36112255461ab96fb8dbffed7460f53fb6127262
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.8.1

Release history Release notifications | RSS feed

This release

0.3.0 This release

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.0.2

2 release files

0.0.1

2 release files

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