Registry / web-framework / ghostos-container

ghostos-container

JSON →
library0.2.7pypypi✓ verified 86d ago

An IoC container library for Interface-oriented programming in Python, part of the GhostOS ecosystem. Currently version 0.2.7, requires Python >=3.10. Release cadence is irregular with recent dev releases for 0.4.0.

pip install ghostos-container
INSTALL
IMPORT
SIG · GHOSTOS-CONTAINER
G
ghostos-container
web-frameworkpythonv0.2.7
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Container
✓ from ghostos_container import Container
✗ from ghostos.container import Container

Basic usage of ghostos-container: define a Provider, register it, and retrieve a value.

from ghostos.container import Container, Provider # Define a simple provider class GreetingProvider(Provider): def register(self, container: Container): container.set('greeting', 'Hello, world!') # Create container and use it container = Container() container.register(GreetingProvider()) print(container.get('greeting'))
Debug
Known issues
gotchaThe package name on PyPI uses a hyphen (ghostos-container) but the Python module uses an underscore (ghostos.container). This often causes confusion with imports.
fix
Use 'from ghostos.container import ...' not 'from ghostos_container import ...'.
affects: >=0.1.0
gotchaThe library is part of the larger GhostOS project and may have dependencies on other ghostos packages not explicitly listed. Ensure you install the required extras (e.g., ghostos[realtime]) if you need full functionality.
fix
Check the GhostOS documentation for additional packages. For basic container usage, ghostos-container is standalone.
affects: >=0.1.0
deprecatedThe GitHub repository shows v0.4.0-dev1 which deprecates MossAgent in favor of MossGhost. This may affect future releases of ghostos-container if it re-exports those symbols.
fix
Migrate from MossAgent to MossGhost when upgrading to 0.4.0+.
affects: >=0.4.0-dev1
Upgrade
Version history
0.2.7latest on PyPI · released Apr 1, 2025
Audit
Dependencies

No dependency data recorded yet.

Agent activity
7 hits · last 30 days
node
6
Resources
ghostos-container — pip install ghostos-container · libregistry