Getting Started¶
This guide will help you get started with the AIBS Informatics Core library.
Installation¶
Using pip¶
pip install aibs-informatics-core
Using uv¶
uv add aibs-informatics-core
Basic Concepts¶
Environment Namespacing¶
The EnvBase class provides a way to create isolated namespaces for your resources:
from aibs_informatics_core.env import EnvBase
# Create an environment namespace
env = EnvBase('dev-myproject')
# Generate prefixed resource names
resource_name = env.prefixed('my_resource', 'blue')
print(resource_name) # 'dev-myproject-my_resource-blue'
Data Models¶
Create type-safe data models using the provided base classes:
from aibs_informatics_core.models.base import PydanticBaseModel
class MyModel(PydanticBaseModel):
name: str
value: int
# Serialize/deserialize
model = MyModel(name="test", value=42)
json_str = model.to_json()
restored = MyModel.from_json(json_str)
Executors¶
Create task executors with automatic input/output validation:
from aibs_informatics_core.executors import BaseExecutor
class MyExecutor(BaseExecutor):
def handle(self, request):
# Process the request
return {"result": "success"}
Next Steps¶
- Explore the API Reference for detailed documentation
- Check the Configuration Guide for advanced setup options
- See the Developer Guide for contribution guidelines