{"id":27824,"library":"ghostos-container","title":"ghostos-container","description":"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.","status":"active","version":"0.2.7","language":"python","source_language":"en","source_url":"https://github.com/ghost-in-moss/GhostOS","tags":["ioc","dependency-injection","container","interface-oriented"],"install":[{"cmd":"pip install ghostos-container","lang":"bash","label":"Install from PyPI"}],"dependencies":[],"imports":[{"wrong":"from ghostos.container import Container","symbol":"Container","correct":"from ghostos_container import Container"}],"quickstart":{"code":"from ghostos.container import Container, Provider\n\n# Define a simple provider\nclass GreetingProvider(Provider):\n    def register(self, container: Container):\n        container.set('greeting', 'Hello, world!')\n\n# Create container and use it\ncontainer = Container()\ncontainer.register(GreetingProvider())\nprint(container.get('greeting'))","lang":"python","description":"Basic usage of ghostos-container: define a Provider, register it, and retrieve a value."},"warnings":[{"fix":"Use 'from ghostos.container import ...' not 'from ghostos_container import ...'.","message":"The package name on PyPI uses a hyphen (ghostos-container) but the Python module uses an underscore (ghostos.container). This often causes confusion with imports.","severity":"gotcha","affected_versions":">=0.1.0"},{"fix":"Check the GhostOS documentation for additional packages. For basic container usage, ghostos-container is standalone.","message":"The 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.","severity":"gotcha","affected_versions":">=0.1.0"},{"fix":"Migrate from MossAgent to MossGhost when upgrading to 0.4.0+.","message":"The 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.","severity":"deprecated","affected_versions":">=0.4.0-dev1"}],"env_vars":null,"search_vec":"'0.2.7':22 '0.4.0':35 '3.10':25 'cadenc':27 'contain':3,6,40 'current':20 'depend':38 'dependency-inject':37 'dev':32 'ecosystem':19 'ghosto':2,18 'ghostos-contain':1 'inject':39 'interfac':10,42 'interface-ori':9,41 'ioc':5,36 'irregular':29 'librari':7 'orient':11,43 'part':15 'program':12 'python':14,24 'recent':31 'releas':26,33 'requir':23 'version':21","created_at":"2026-05-09T05:52:16.968941+00:00","updated_at":"2026-05-09T05:52:16.968941+00:00","problems":null,"ecosystem":"pypi","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":"","cli_version":null,"type":"library","homepage":null,"github":"https://github.com/ghost-in-moss/GhostOS","docs":null,"changelog":null,"pypi":"https://pypi.org/project/ghostos-container/","npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["web-framework","data"],"base_url":null,"auth_type":null,"provenance":{"verified_status":"passing","verified_at":"2026-07-03","last_verified":"2026-07-03","next_check":"2026-08-02","install_tag":null}}