Skip to main content

Python Core Package.

Project description


Python application Upload Python Package Production wakatime

There's probably a fiesta somewhere.

Python Package Core

A Python package core for building a Python package.


Installation using pip

pip install probable-fiesta

Installation with automatic build and install

It is recommended to setup a virtual environment.

To install locally with automatic build and install, run the following command in the root directory of the project.

git clone
cd probable-fiesta
chmod +x scripts/

Installation with manual build and install

Setup a new virtual environment and install packages in requirements.txt.

python -m venv build_venv
source build_venv/bin/activate
(build_venv) $ pip install -r build_requirements.txt
(build_venv) $ hatch build
(build_venv) $ pip install dist/probable_fiesta-${VERSION}.tar.gz

Installation in Jupyter Notebook

To install the into the Jupyter Notebook kernel:

import sys
!{sys.executable} -m pip install -U --no-deps probable-fiesta


probable_fiesta --help

Build and Run

Build and Run command

Build and a command. Pass flags, for example --version:

./scripts/ & probable_fiesta --version




Developer Reference

This package contains various modules that can be used to build a Python package.


  • probable_fiesta: Main module.
  • Main application.
  • Main application.
  • probable_fiesta.cli: Command line interface.
  • probable_fiesta.command: Internal command implementation.
  • probable_fiesta.config: Configuration.
  • probable_fiesta.logger: Logging.

Create Application Example

Create a new application using the probable_fiesta package.

  • Create a main module, for example
# Path:
from probable_fiesta.config.variables import DotEnvDef
from probable_fiesta.config.builder.config_builder import ConfigBuilder
from probable_fiesta.logger.builder.logger_factory import LoggerFactory
from import ContextFactory as CF
from import AppBuilder

# Import or add your business logic here
# For example the next get version functions:
def get_version_echo(version):
    return version
def get_version():
    return "v0"

# Create custom dotenv definition from DotEnvDef
class MyDotEnvDef(DotEnvDef):
    def __init__(self):
        self.version_echo = "v0" # This will be overwritten by .env file

    # make the class iterable
    def __iter__(self):
        for attr, value in self.__dict__.items():
            yield value  # only yield the values

# Create main function
def main(args):
    # Create config, will be replaced by a Factory in the future
    cB = ConfigBuilder()
    config = (
            LoggerFactory.new_logger_get_logger("main_app", "INFO")
        .dotenv.load_dotenv()  # Load .env file if exists

    # Create main app
    main_app = ("main_app")
        # Add your arguments
            "--version", action="store_true", help="show version builder"
        # Add your commands that do not require parsed arguments
            CF.new_context_one_new_command("version", "version", get_version, None)
        # Define which are executable

    # Create commands that require parsed arguments
    c3 = CF.new_context_one_new_command(
        main_app.get_arg("version_echo"),  # CLI overrides .env
    # Add commands to main app

    # Check build errors
    if main_app.args_parser.error:

    # Run main app
    run_context =
    history = run_context.get_run_history()
    return history

This allows you to call the main function from the command line:

python --version

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

probable_fiesta-0.1.2.tar.gz (21.7 kB view hashes)

Uploaded source

Built Distribution

probable_fiesta-0.1.2-py3-none-any.whl (26.6 kB view hashes)

Uploaded py3

Supported by

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