Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 36 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Build & Publish

on:
push:
tags:
- 'v*'

jobs:
build-and-publish:
name: Build and Publish to PyPI
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.12'

- name: Install build dependencies
run: |
python -m pip install --upgrade pip
pip install build twine

- name: Build package
run: python -m build

- name: Check package
run: twine check dist/*

- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.PYPI_API_TOKEN }}
17 changes: 8 additions & 9 deletions fletx/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
from fletx.core.di import DI


__version__ = "0.1.4-rc1"
__version__ = "0.1.4"


####
## FLETX - DEPENDENCY INJECTION INTERFACE
Expand All @@ -15,28 +16,26 @@ class FletX:
This class provides a simple interface to interact with the Dependency Injection (DI) container.
It allows to register, find, delete, and reset instances in the DI container.
"""

@staticmethod
def put(instance, tag=None):
"""Register an instance in the DI container"""
return DI.put(instance, tag)

@staticmethod
def find(cls, tag=None):
"""Retrieve an instance from the DI container"""
return DI.find(cls, tag)

@staticmethod
def delete(cls, tag=None):
"""Delete an instance from the DI container"""
return DI.delete(cls, tag)

@staticmethod
def reset():
"""Reset the DI container, clearing all registered instances."""
return DI.reset()

__all__ = [
'FletX',
'__version__'
]

__all__ = ["FletX", "__version__"]
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "FletXr"
version = "0.1.4-rc1"
version = "0.1.4"
description = "The GetX-inspired Python Framework for Building Reactive, Cross-Platform Apps with Flet"
readme = "PYPI.md"
license = {file = "LICENSE"}
Expand Down
Loading