
Security News
npm Adopts OIDC for Trusted Publishing in CI/CD Workflows
npm now supports Trusted Publishing with OIDC, enabling secure package publishing directly from CI/CD workflows without relying on long-lived tokens.
A type hint based dependency injection library for python language (+3.6). While there are already several DI libraries for python, this library is inspired by Java Spring and aims to provide similar interface and functionality to Java Spring.
Supports Python 3.7 and 3.8.
Super simple. Attach @component
decorator to any classes which need to be injected in somewhere constructor, and attach @autowired
decorator to constructors which need dependency injection.
from pytidy.decorators import component, autowired
@component
class Hello:
def say(self):
print("Hello")
class Injected:
@autowired
def __init__(self, instance: Hello):
self.instance = instance
def say_proxy(self):
self.instance.say()
a = Injected()
a.say_proxy()
Also supports dataclass of Python3.7+.
from dataclasses import dataclass
from pytidy.decorators import component, autowired_cls
@component
class Hello:
def say(self):
print("Hello")
@autowired_cls
@dataclass
class Injected:
instance: Hello
def say_proxy(self):
self.instance.say()
a = Injected()
a.say_proxy()
MIT
FAQs
Dependency Injection library based on type hints
We found that pytidy demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer 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
npm now supports Trusted Publishing with OIDC, enabling secure package publishing directly from CI/CD workflows without relying on long-lived tokens.
Research
/Security News
A RubyGems malware campaign used 60 malicious packages posing as automation tools to steal credentials from social media and marketing tool users.
Security News
The CNA Scorecard ranks CVE issuers by data completeness, revealing major gaps in patch info and software identifiers across thousands of vulnerabilities.