--- id: objectory version: "0.3.1" license: BSD-3-Clause license_treatment: permissive maintenance: active --- # objectory — A light library for general purpose object factories License: permissive · Maintenance: active · Downloads: 627.0K/mo ## What it is and what it does objectory is a lightweight Python library that implements factory patterns for dynamic object instantiation. It provides three main approaches: a general-purpose factory function that can instantiate any Python class by name, an abstract factory metaclass for inheritance-based registration, and a standalone registry for explicit class registration. The library is designed to decouple object creation from usage, allowing objects to be instantiated from configuration dictionaries without hardcoding class references. The package has no runtime dependencies and installs cleanly on modern Python versions (3.10 through 3.14). It is actively maintained but remains in beta, meaning the API may change between releases. It is suitable for scenarios where you need flexible, configuration-driven object instantiation—particularly useful in machine learning pipelines, plugin systems, or any architecture where object types are determined at runtime rather than compile time. Use it for: - Building plugin systems where user-provided or configuration-specified classes are instantiated dynamically without modifying core code. - Machine learning experiment frameworks where model, optimizer, and loss function classes are selected and instantiated from configuration files. - Dependency injection containers where object graphs are built from declarative configuration rather than imperative setup. - Testing frameworks that need to instantiate mock or fixture objects by class name from test specifications. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Provides dynamic object factory implementations using abstract factory and registry patterns, allowing objects to be instantiated from configuration without modifying factory code. Yes, if you need dynamic object instantiation and can tolerate beta-stage API changes. The low install friction, active maintenance, permissive license, and absence of dependencies make it a reasonable choice for configuration-driven architectures. However, pin your version carefully and review release notes before upgrading, since API stability is explicitly not guaranteed. ## Install pip install objectory uv add objectory poetry add objectory ## Installing objectory Before you install: Low friction installation with no runtime dependencies. Actively maintained with recent releases; however, the package is in beta stage and explicitly warns that API stability is not guaranteed between releases. License in practice: BSD-3-Clause is permissive and imposes minimal restrictions on use, modification, and distribution in both open-source and proprietary contexts. Quickstart: pip install objectory from objectory import factory obj = factory("builtins.list", [4, 2]) print(obj) # [4, 2] Requires Python >=3.10; API stability not guaranteed between releases during beta development. Verify before relying: - Whether the package's registry and abstract factory approaches scale well with large numbers of registered classes. - Performance characteristics when instantiating objects with complex nested configurations. ## Package facts - License: BSD-3-Clause (permissive) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 627.0K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags object factory pattern, dynamic object instantiation, registry-based factory, abstract factory implementation, configuration-driven object creation, factory-pattern, dependency-injection, configuration-driven [View on SkillFed](https://skillfed.io/packages/objectory) · [View on PyPI](https://pypi.org/project/objectory/)