Consolidated Pydantic v2 schemas for BlackBox LLM operations
Project description
BlackBox Schemas
A Python package providing consolidated Pydantic v2 models for BlackBox LLM operations.
Installation
-
Install the package:
pip install blackbox-schemas
-
Use the models in your code:
#!/usr/bin/env python3 # Test importing from blackbox_schemas try: # Import directly from the models module from blackbox_schemas.models import CategoryEvaluation, RFPEvaluation, Recommendation, SubmissionDetails print("Successfully imported models from blackbox_schemas.models") # Create test instances technical_category = CategoryEvaluation( category="Technical", pros_cons={ "Pros": ["Clear requirements", "Standard technology"], "Cons": ["Short timeline"] }, feasibility="High", observations=["Well documented"], recommendations=["Proceed with caution"] ) legal_category = CategoryEvaluation( category="Legal", pros_cons={ "Pros": ["Standard terms", "Clear compliance requirements"], "Cons": ["Strict liability clauses"] }, feasibility="Medium", observations=["Some complex legal requirements"], recommendations=["Legal review needed"] ) recommendation = Recommendation( decision="Go", summary="Project is technically feasible with manageable legal risks", next_steps=["Assemble technical team", "Schedule legal review", "Prepare timeline"] ) submission_details = SubmissionDetails( due_date="2023-12-15", submission_type="online", submission_details="Submit via email to proposals@example.com", submission_instructions="Send as a single PDF file, maximum 20MB. Include company name in filename." ) # Create the full RFP evaluation rfp_eval = RFPEvaluation( evaluation=[technical_category, legal_category], recommendation=recommendation, timeline_and_submission_details=submission_details ) # Test serialization/deserialization print("\n✅ Full RFP Evaluation:") json_data = rfp_eval.model_dump_json(indent=2) print(f"\nJSON output: {json_data}") # Test recreating from dict print("\n✅ Recreating from dict:") recreated = RFPEvaluation.model_validate_json(json_data) print(f"Recreated evaluation has {len(recreated.evaluation)} categories") except ImportError as e: print(f"❌ Import error: {e}") except Exception as e: print(f"❌ Error: {e}")
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file blackbox_schemas-2.0.2.tar.gz.
File metadata
- Download URL: blackbox_schemas-2.0.2.tar.gz
- Upload date:
- Size: 5.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c3f2e6f6b6d07acdf9335570959be895c153f2bde90ad3d6cddad7b657479fad
|
|
| MD5 |
aae0588d21b73d22d722579734c46b42
|
|
| BLAKE2b-256 |
4a8a0cff16a6a1259986b1d74000fb6c88d089e4e345aa47d92f47c91954af70
|
File details
Details for the file blackbox_schemas-2.0.2-py3-none-any.whl.
File metadata
- Download URL: blackbox_schemas-2.0.2-py3-none-any.whl
- Upload date:
- Size: 5.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
44b45b2101fb74f1ee3dbf0c78cc99159d9d15d7d29d9646912d0f17bbe1c099
|
|
| MD5 |
37507001fa07dc6ca17fad05881874c2
|
|
| BLAKE2b-256 |
79d90538f13b6476b167a0ceeefdb93204e6d9f1d737b727a204fe148339faac
|