apeex


Nameapeex JSON
Version 0.1.0a1 PyPI version JSON
download
home_pagehttps://github.com/dvakhitov/apeex-framework
SummaryA modular, interface-driven web framework inspired by Symfony, built on top of FastAPI.
upload_time2025-10-14 19:49:48
maintainerNone
docs_urlNone
authorApeex Team
requires_python>=3.11
licenseMIT
keywords framework fastapi symfony web dependency-injection
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Apeex Framework

A modular, interface-driven Python web framework inspired by **Symfony**, built on top of **FastAPI**.

---

## 🧩 Project Structure

```
apeex/         # Core framework (Kernel, Container, HTTP, ORM, CLI, Events)
adapters/      # Integrations and adapters for external libraries
bundles/       # Feature modules (bundles)
scripts/       # CLI and dev utilities
config/        # Configuration files and service definitions
tests/         # Unit and integration tests
```

---

## 🧰 Development

Install dependencies (assuming poetry is used):

```bash
poetry install
```

Run code quality checks:

```bash
poetry run black .
poetry run isort .
poetry run flake8 .
poetry run mypy .
poetry run pytest -v
```

All comments in code should be in **English**.

---

## ⚙️ DI Container

The framework provides a Dependency Injection container for managing services.

**Register services:**

```python
from apeex.container.container import Container

container = Container()
container.set('Logger', Logger())
container.set_factory('UserService', lambda c: UserService(c.get('Logger')))
```

**Autowire classes:**

```python
user_service = container.autowire(UserService)  # dependencies resolved automatically
```

**Singleton scope:**

```python
a1 = container.autowire(UserService)
a2 = container.autowire(UserService)
assert a1 is a2
```

**Build bundles:**

```python
from bundles.sample_bundle.bundle import SampleBundle
bundle = SampleBundle()
container.build_bundle(bundle)
```

---

## 🏗️ Kernel & Bundles (Planned)

* `Kernel` will manage application lifecycle, bundles, container, and routing.
* `Bundle` is an abstract class that allows registration of services and lifecycle hooks (`build`, `boot`, `shutdown`).
* Bundles can define controllers and services with full container integration.
* Example bundles: `DemoBundle`, `SampleBundle`.

---

## 📄 Contributing

See `CONTRIBUTING.md` for guidelines on:

* Branching strategy
* Commit messages (use Conventional Commits)
* Code formatting and linting
* Testing

---

## 🚦 CI/CD

The project includes a GitHub Actions pipeline to automatically:

* Install dependencies
* Run black, isort, flake8, mypy checks
* Run pytest

```yaml
name: CI

on:
  push:
    branches: [ main, develop ]
  pull_request:
    branches: [ main, develop ]

jobs:
  build:
    runs-on: ubuntu-latest

    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-python@v5
        with:
          python-version: '3.11'
      - run: |
          pip install poetry
          poetry install
      - run: |
          poetry run black --check .
          poetry run isort --check-only .
          poetry run flake8 .
          poetry run mypy .
      - run: poetry run pytest -v
```

---

## 📖 Examples

**Defining a simple service and controller:**

```python
class HelloService:
    def greet(self, name: str) -> str:
        return f'Hello, {name}!'

class HelloController:
    def __init__(self, service: HelloService):
        self.service = service

    def hello(self, name: str) -> str:
        return self.service.greet(name)

container.set_factory('HelloService', lambda c: HelloService())
container.set_factory('HelloController', lambda c: HelloController(c.get('HelloService')))

controller = container.get('HelloController')
print(controller.hello('World'))
```

**Autowiring example:**

```python
controller2 = container.autowire(HelloController)
assert controller2 is container.get('HelloController')  # singleton behavior
```

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/dvakhitov/apeex-framework",
    "name": "apeex",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.11",
    "maintainer_email": null,
    "keywords": "framework, fastapi, symfony, web, dependency-injection",
    "author": "Apeex Team",
    "author_email": "team@apeex.dev",
    "download_url": "https://files.pythonhosted.org/packages/8b/eb/12c6b1f3e06eed29644bc31a9e32578587c5f38425ade2e59388bb339397/apeex-0.1.0a1.tar.gz",
    "platform": null,
    "description": "# Apeex Framework\n\nA modular, interface-driven Python web framework inspired by **Symfony**, built on top of **FastAPI**.\n\n---\n\n## \ud83e\udde9 Project Structure\n\n```\napeex/         # Core framework (Kernel, Container, HTTP, ORM, CLI, Events)\nadapters/      # Integrations and adapters for external libraries\nbundles/       # Feature modules (bundles)\nscripts/       # CLI and dev utilities\nconfig/        # Configuration files and service definitions\ntests/         # Unit and integration tests\n```\n\n---\n\n## \ud83e\uddf0 Development\n\nInstall dependencies (assuming poetry is used):\n\n```bash\npoetry install\n```\n\nRun code quality checks:\n\n```bash\npoetry run black .\npoetry run isort .\npoetry run flake8 .\npoetry run mypy .\npoetry run pytest -v\n```\n\nAll comments in code should be in **English**.\n\n---\n\n## \u2699\ufe0f DI Container\n\nThe framework provides a Dependency Injection container for managing services.\n\n**Register services:**\n\n```python\nfrom apeex.container.container import Container\n\ncontainer = Container()\ncontainer.set('Logger', Logger())\ncontainer.set_factory('UserService', lambda c: UserService(c.get('Logger')))\n```\n\n**Autowire classes:**\n\n```python\nuser_service = container.autowire(UserService)  # dependencies resolved automatically\n```\n\n**Singleton scope:**\n\n```python\na1 = container.autowire(UserService)\na2 = container.autowire(UserService)\nassert a1 is a2\n```\n\n**Build bundles:**\n\n```python\nfrom bundles.sample_bundle.bundle import SampleBundle\nbundle = SampleBundle()\ncontainer.build_bundle(bundle)\n```\n\n---\n\n## \ud83c\udfd7\ufe0f Kernel & Bundles (Planned)\n\n* `Kernel` will manage application lifecycle, bundles, container, and routing.\n* `Bundle` is an abstract class that allows registration of services and lifecycle hooks (`build`, `boot`, `shutdown`).\n* Bundles can define controllers and services with full container integration.\n* Example bundles: `DemoBundle`, `SampleBundle`.\n\n---\n\n## \ud83d\udcc4 Contributing\n\nSee `CONTRIBUTING.md` for guidelines on:\n\n* Branching strategy\n* Commit messages (use Conventional Commits)\n* Code formatting and linting\n* Testing\n\n---\n\n## \ud83d\udea6 CI/CD\n\nThe project includes a GitHub Actions pipeline to automatically:\n\n* Install dependencies\n* Run black, isort, flake8, mypy checks\n* Run pytest\n\n```yaml\nname: CI\n\non:\n  push:\n    branches: [ main, develop ]\n  pull_request:\n    branches: [ main, develop ]\n\njobs:\n  build:\n    runs-on: ubuntu-latest\n\n    steps:\n      - uses: actions/checkout@v4\n      - uses: actions/setup-python@v5\n        with:\n          python-version: '3.11'\n      - run: |\n          pip install poetry\n          poetry install\n      - run: |\n          poetry run black --check .\n          poetry run isort --check-only .\n          poetry run flake8 .\n          poetry run mypy .\n      - run: poetry run pytest -v\n```\n\n---\n\n## \ud83d\udcd6 Examples\n\n**Defining a simple service and controller:**\n\n```python\nclass HelloService:\n    def greet(self, name: str) -> str:\n        return f'Hello, {name}!'\n\nclass HelloController:\n    def __init__(self, service: HelloService):\n        self.service = service\n\n    def hello(self, name: str) -> str:\n        return self.service.greet(name)\n\ncontainer.set_factory('HelloService', lambda c: HelloService())\ncontainer.set_factory('HelloController', lambda c: HelloController(c.get('HelloService')))\n\ncontroller = container.get('HelloController')\nprint(controller.hello('World'))\n```\n\n**Autowiring example:**\n\n```python\ncontroller2 = container.autowire(HelloController)\nassert controller2 is container.get('HelloController')  # singleton behavior\n```\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "A modular, interface-driven web framework inspired by Symfony, built on top of FastAPI.",
    "version": "0.1.0a1",
    "project_urls": {
        "Documentation": "https://github.com/dvakhitov/apeex-framework",
        "Homepage": "https://github.com/dvakhitov/apeex-framework",
        "Source": "https://github.com/dvakhitov/apeex-framework"
    },
    "split_keywords": [
        "framework",
        " fastapi",
        " symfony",
        " web",
        " dependency-injection"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "53a3176fd0b7020b3ec72f3bc2a2045c33fd79ac3f96a4df4487dc9f1e87d421",
                "md5": "5b82526312da6ee057ae78c711270d7a",
                "sha256": "7bfe89e062fb11795c110c730ac6bc94a8a6f0e001bdf0b1dad1028b48e81770"
            },
            "downloads": -1,
            "filename": "apeex-0.1.0a1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "5b82526312da6ee057ae78c711270d7a",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.11",
            "size": 41131,
            "upload_time": "2025-10-14T19:49:47",
            "upload_time_iso_8601": "2025-10-14T19:49:47.024665Z",
            "url": "https://files.pythonhosted.org/packages/53/a3/176fd0b7020b3ec72f3bc2a2045c33fd79ac3f96a4df4487dc9f1e87d421/apeex-0.1.0a1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "8beb12c6b1f3e06eed29644bc31a9e32578587c5f38425ade2e59388bb339397",
                "md5": "726eb7aef4ac77ce661a581c755c62f7",
                "sha256": "c85647009c07077b30f53a7e7c5dc100c6e277cebbd76b4edf316ada25a04321"
            },
            "downloads": -1,
            "filename": "apeex-0.1.0a1.tar.gz",
            "has_sig": false,
            "md5_digest": "726eb7aef4ac77ce661a581c755c62f7",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.11",
            "size": 19688,
            "upload_time": "2025-10-14T19:49:48",
            "upload_time_iso_8601": "2025-10-14T19:49:48.914712Z",
            "url": "https://files.pythonhosted.org/packages/8b/eb/12c6b1f3e06eed29644bc31a9e32578587c5f38425ade2e59388bb339397/apeex-0.1.0a1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-10-14 19:49:48",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "dvakhitov",
    "github_project": "apeex-framework",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "apeex"
}
        
Elapsed time: 1.43545s