Skip to main content

confluent

⚠️ Please don't use confluent anymore! Its development has been stopped in favour of ninja-bear, which follows the same ideology but uses different concepts in the background ⚠️

In times of distributed systems and en vogue micro-architecture it can get quite cumbersome to keep constants that are required by several components up-to-date and in sync. It can get especially hard when these components or services are written in different languages. confluent targets this issue by using a language neutral YAML configuration that lets you generate language specific config files in the style of classes, structs or consts.

Example

Alright, after all this confusing nerd-talk, lets just have a look at a simple example to see what confluent can do for you.

The example YAML file contains a property named opener with the value Hello World. Output files shall be generated for TypeScript, Python and C. In addition, the C-file shall be distributed to a Git server's config-folder (for more information please have a look at test-config.yaml).

Input (readme-config.yaml)

languages:
  - type: typescript
    property_naming: screaming_snake
    export: esm

  - type: python
    file_naming: snake
    property_naming: screaming_snake

  - type: c
    file_naming: snake
    property_naming: pascal
    distributions:
      - type: git
        path: config
        url: https://github.com/idontknow/example.git

properties:
  - type: string
    name: opener
    value: Hello World

Execute confluent

# -d is used to distribute the C-file to Git.
python3 -m confluent -c readme-config.yaml -d

Output (readme-config.ts)

export const ReadmeConfig = {
    OPENER: 'Hello World',
} as const;

Output (readme_config.py)

class ReadmeConfig:
    OPENER = 'Hello World'

Output (readme_config.h)

#ifndef README_CONFIG_H
#define README_CONFIG_H

/* Generated with confluent v0.3.0 (https://pypi.org/project/confluent/). */
const struct {
    char* Opener;
} ReadmeConfig = {
    "Hello World",
};

#endif /* README_CONFIG_H */

Currently supported languages

  • Java
  • JavaScript
  • TypeScript
  • Python
  • C
  • Go

Installation

python3 -m pip install confluent

Configuration

For detailed configuration information, please check example/test-config.yaml. All possible values are described there.

Usage

Commandline

# For more information run "python3 -m confluent -h".
python3 -m confluent -c test-config.yaml -o generated

Script

from confluent import Orchestrator

# Create Orchestrator instance from file.
orchestrator = Orchestrator.read_config('test-config.yaml')

# Write configs to 'generated' directory.
orchestrator.write('generated')

# Distribute configs (if required).
orchestrator.distribute()

How to participate

If you feel that there's a need for another language, feel free to add it. For detailed information how to add support for a new language, please refer to README.md.

Metadata

Release files for confluent 0.3.2

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

Source distribution (sdist)

Source distribution for confluent 0.3.2
File Size Uploaded Provenance
confluent-0.3.2.tar.gz 28.8 kB Without provenance Details

Built distribution (wheel)

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

Total release size: 68.3 kB

Release files / confluent-0.3.2.tar.gz

Download URL confluent-0.3.2.tar.gz
Size 28.8 kB
Tags Source
SHA-256 checksum
How to use checksums
6f740ded9d6fc1c30fbd706138803fde5c10c5521245ba7316e99ba44bc50814
BLAKE2b-256 checksum
How to use checksums
8be8eebb212ff3ea321d7067a36cc5a8498bca694be155684e812fdcb3156406
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.12.7

Release files / confluent-0.3.2-py3-none-any.whl

Download URL confluent-0.3.2-py3-none-any.whl
Size 39.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
58784607d390b65459116e7f301362ced1a4e82627e00cc55ca5b4bb3130b0bc
BLAKE2b-256 checksum
How to use checksums
92ce8db92e2d1594b7597fdeac507ac69cc220f516b76283089fb19bc891a289
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.12.7

Security for confluent 0.3.2

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.

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