CtrlK
BlogDocsLog inGet started
Tessl Logo

tessl/pypi-rodi

Implementation of dependency injection for Python 3

Overall
score

92%

Overview
Eval results
Files

rubric.jsonevals/scenario-1/

{
  "context": "This criteria evaluates how well the engineer uses the rodi package to build a service provider and resolve services. The focus is on proper container instantiation, service registration, provider building, and service resolution.",
  "type": "weighted_checklist",
  "checklist": [
    {
      "name": "Container instantiation",
      "description": "Creates a Container instance from rodi to manage service registrations",
      "max_score": 15
    },
    {
      "name": "Service registration",
      "description": "Registers all three services (UserRepository, EmailService, UserManager) with the container using container.register() or similar registration methods (add_transient, add_singleton, add_scoped)",
      "max_score": 25
    },
    {
      "name": "Provider building",
      "description": "Calls container.build_provider() to create a service provider that validates and compiles service activators",
      "max_score": 20
    },
    {
      "name": "Service resolution",
      "description": "Uses provider.get() to resolve services from the built provider (e.g., provider.get(UserManager))",
      "max_score": 20
    },
    {
      "name": "Availability check",
      "description": "Uses the 'in' operator or similar method to check if a service is available in the provider (e.g., UserManager in provider)",
      "max_score": 10
    },
    {
      "name": "Dependency injection",
      "description": "Implements UserManager constructor to accept UserRepository and EmailService as dependencies via type-hinted parameters, allowing rodi to automatically inject them",
      "max_score": 10
    }
  ]
}

Install with Tessl CLI

npx tessl i tessl/pypi-rodi

tile.json