Skip to main content

Highly opinionated workflow and orchestration toolkit for modern microservice development

Project description

flox

Flox is an opinionated orchestration and automation tool for microservice development using modern stack.

Flox is under active development by amazing developers working at @epsyhealth where we're on a mission to give the world a better way to live with epilepsy. If you would like to join us to work on even more exciting projects, visit our website: https://www.epsyhealth.com/careers

With flox we aim to automate the boring parts of project creation letting you focus on your business logic.

Flox has a modular architecture, allowing you to extend its functionality with plugins.

Flox can:

  • Create git repository (with flox-git)
  • Create and configure GitHub repositories (with flox-github)
  • Create sentry project and integrate it with your project (with flox-sentry)
  • Bootstrap your project using your own templates (with flox-bootstrap)

Soon to see:

  • AWS integration
  • Terraform support
  • Serverless support

Key features

  • Multi level configuration support (define system, user and project level configuration)
  • Support for secrets with native system keyring support
  • Plugin architecture with build-in plugin manager
  • Workflow support (automatically create branches, PR and more...)
  • Support for multiple profiles (prod, dev... name it)
  • Interactive configuration management based on the plugin requirements
  • Work in command line mode or in interactive shell

Configuration

Flox supports hierarchical configuration with merging and overwriting support on each level, with possibility with custom configuration per profile.

Current configuration load order:

  • /etc/flox/settings.toml
  • /etc/flox/settings.{profile}.toml
  • ~/.flox/settings.toml
  • ~/.flox/settings.{profile}.toml
  • {project_root}/.flox/settings.toml
  • {project_root}/.flox/settings.{profile}.toml

Global configuration of the flox system itself is defined under global section , while each plugin has it's own dedicated section.

Additionally flox supports interactive environment configuration with flox configure command. Configuration command uses plugin autodiscvery, to list all available options run flox configure --help.

Installation

$ pip install flox-cli

optionally you can specify extra features to be installed at the same time:

$ pip install flox-cli[git,github,bootstrap,sentry]
$ flox --help
Usage: flox [OPTIONS] COMMAND [ARGS]...

  Consistent project management and automation with flox

Options:
  -v      Verbose mode - show debug info
  --help  Show this message and exit.

Commands:
  config   Run configuration wizard for flox.
  plugin   Manage plugins
  project  Initialise new project with flox

Plugin management

List all installed plugins

$ flox plugin 

 name       description                                                                                url                                     version
───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
 global     Highly opinionated workflow and orchestration toolkit for modern microservice development  https://github.com/getflox/flox         0.5.0
 git        Bootstrap git repository for your project managed by flox.                                 https://github.com/getflox/flox-git     0.2.0
 github     Create and enforce standard rules on GitHub repositories managed by flox.                  https://github.com/getflox/flox-github  0.1.2
 bootstrap                                                                                             None                                    0.1.2
 sentry     Automatically create projects and teams for flox managed projects                          https://github.com/getflox/flox-sentry  0.1.2

Search and install flox plugin

flox plugin search aws
flox plugin install flox-aws

Project creation

With flox you can quickly create a new project to work on - please remember that flox relays on the plugins, so you must first install and configure plugins to see the real power of flox.

Example below was executed with git, github, bootstrap and sentry plugins installed.

$ flox project --templates python --templates serverless-python                                                                                                                                                                                                                                                    11:53:39
Enter project name: Flox Project
Enter project description: Sample project created with flox
✔ [github]  Created GitHub repository 'https://github.com/getflox/flox-project' [git]  Initialised git repository
✔ [git]  Added new remote origin with github.com/getflox/flox-project.git
✔ [git]  Created new master branch
✔ [git]  Switched to master branch
✔ [sentry]  Project "flox-project" created
Bootstraps project with given templates:  46%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████▌                                                                                                                                                          | 6/13
  Python Version [3.8.12]:
  Enable xray support [Y/n]:
ℹ [bootstrap]  Bootstrapping project using template: python
ℹ [bootstrap]  Bootstrapping project using template: serverless-python
✔ [github]  Vulnerability alerts: On
✔ [github]  Automated security fixes enabled
✔ [github]  Branch protection rules set for "master" branch.
✔ [git]  Created default .gitignore: flox-project/.flox/.gitignore
✔ [git]  Added flox meta files to git repository
✔ [git]  Added flox bootstrapped files to git repository
ℹ [git]  Skipping branch master as branch already exists
✔ [git]  Pushed to remote origin
✔ [git]  Created branch develop
✔ [sentry]  Assigned  teams to flox-project project
✔ [git]  Pushed to remote origin
Push changes to remote: 100%|

$ ls -la ./flox-project
drwxr-xr-x   4 me  staff  128 Jan 13 11:54 .flox
drwxr-xr-x  13 me  staff  416 Jan 13 11:54 .git
-rw-r--r--   1 me  staff    6 Jan 13 11:54 .python-version
-rw-r--r--   1 me  staff   14 Jan 13 11:54 README.md
drwxr-xr-x   3 me  staff   96 Jan 13 11:54 flox__project
-rw-r--r--   1 me  staff  424 Jan 13 11:54 package.json
-rw-r--r--   1 me  staff  454 Jan 13 11:54 pyproject.toml
-rw-r--r--   1 me  staff  510 Jan 13 11:54 serverless.yml.py

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

flox-cli-0.5.2.tar.gz (16.4 kB view hashes)

Uploaded Source

Built Distribution

flox_cli-0.5.2-py3-none-any.whl (18.3 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page