
Security News
NIST Under Federal Audit for NVD Processing Backlog and Delays
As vulnerability data bottlenecks grow, the federal government is formally investigating NISTβs handling of the National Vulnerability Database.
OpenBioCure_CoreLib is the foundational core library for the HerpAI platform. It provides shared infrastructure components, configuration management, logging utilities, database session handling, and the repository pattern used across HerpAI agents and services.
OpenBioCure_CoreLib is the foundational core library for the HerpAI platform. It provides shared infrastructure components, configuration management, logging utilities, database session handling, and the repository pattern used across HerpAI agents and services.
Come chat with us on Discord: HerpAI Discord Server
IRepository
, Repository
, BaseEntity
, Specification
, YamlConfig
, Environment
, StartupTask
, and AppConfig
are now exposed directly from the root package.from openbiocure_corelib import IRepository, Repository, BaseEntity, Specification, YamlConfig, Environment, StartupTask, AppConfig
release-3.1.0
containing these changes.pip install openbiocure-corelib
Or install from GitHub:
pip install git+https://github.com/openbiocure/HerpAI-Lib.git
For development:
git clone https://github.com/openbiocure/HerpAI-Lib.git
cd HerpAI-Lib
pip install -e .
import asyncio
from openbiocure_corelib import engine
from examples.domain.todo_entity import Todo
from examples.repository.todo_repository import ITodoRepository, CompletedTodoSpecification
async def main():
engine.initialize()
await engine.start()
todo_repo = engine.resolve(ITodoRepository)
todo = Todo(title="Learn OpenBioCure_CoreLib", description="Use DI and repository", completed=False)
created = await todo_repo.create(todo)
created.completed = True
await todo_repo.update(created)
completed_todos = await todo_repo.find(CompletedTodoSpecification())
print(f"Completed todos: {len(completed_todos)}")
asyncio.run(main())
from openbiocure_corelib import engine, YamlConfig
engine.initialize()
config = engine.resolve(YamlConfig)
print(config.get('database.host'))
print(config.get('app.default_model_provider'))
from openbiocure_corelib import StartupTask
class MyStartupTask(StartupTask):
order = 50
async def execute(self):
print("Running my startup task!")
from openbiocure_corelib import Specification
class UserByUsernameSpec(Specification):
def __init__(self, username):
self.username = username
def to_expression(self):
from myapp.models import User
return User.username == self.username
# Usage:
user_repo = engine.resolve(IUserRepository)
user = await user_repo.find_one(UserByUsernameSpec("johndoe"))
Example | Description |
---|---|
01_basic_todo.py | Basic repository pattern with a Todo entity |
02_yaml_config.py | Working with YAML configuration and dotted access |
03_app_config.py | Using strongly-typed dataclass configuration |
04_custom_startup.py | Creating custom startup tasks with ordering |
05_database_operations.py | Advanced database operations with repositories |
06_autodiscovery.py | Auto-discovery of startup tasks and components |
07_multi_config.py | Working with multiple configuration sources |
openbiocure_corelib/
βββ config/
β βββ app_config.py
β βββ dataclass_config.py
β βββ environment.py
β βββ settings.py
β βββ yaml_config.py
βββ core/
β βββ configuration_startup_task.py
β βββ engine.py
β βββ interfaces.py
β βββ service_collection.py
β βββ service_scope.py
β βββ singleton.py
β βββ startup_task_executor.py
β βββ startup_task.py
β βββ type_finder.py
βββ data/
β βββ db_context_startup_task.py
β βββ db_context.py
β βββ entity.py
β βββ repository.py
β βββ specification.py
βββ domain/
βββ infrastructure/
β βββ caching/
β βββ events/
β βββ logging/
βββ utils/
This library is released under the MIT License as part of the OpenBioCure initiative.
All notable changes to this project will be documented here.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
openbiocure_corelib
test_db_dir
) to create temporary directory for test database filesinitialized_engine
fixtureEngine.current()
test to properly await engine startRepository.update
method to handle both string IDs and entity objectsFAQs
OpenBioCure_CoreLib is the foundational core library for the HerpAI platform. It provides shared infrastructure components, configuration management, logging utilities, database session handling, and the repository pattern used across HerpAI agents and services.
We found that openbiocure-corelib demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
As vulnerability data bottlenecks grow, the federal government is formally investigating NISTβs handling of the National Vulnerability Database.
Research
Security News
Socketβs Threat Research Team has uncovered 60 npm packages using post-install scripts to silently exfiltrate hostnames, IP addresses, DNS servers, and user directories to a Discord-controlled endpoint.
Security News
TypeScript Native Previews offers a 10x faster Go-based compiler, now available on npm for public testing with early editor and language support.