
Product
Announcing Socket Fix 2.0
Socket Fix 2.0 brings targeted CVE remediation, smarter upgrade planning, and broader ecosystem support to help developers get to zero alerts.
.. image:: https://img.shields.io/pypi/l/picobox :target: https://pypi.python.org/pypi/picobox :alt: PyPI - License
.. image:: https://img.shields.io/pypi/v/picobox.svg :target: https://pypi.python.org/pypi/picobox :alt: PyPI - Version
.. image:: https://img.shields.io/pypi/pyversions/picobox :target: https://pypi.python.org/pypi/picobox :alt: PyPI - Python Versions
.. image:: https://img.shields.io/pypi/dm/picobox :target: https://pypi.python.org/pypi/picobox :alt: PyPI - Downloads
Picobox is opinionated dependency injection framework designed to be clean, pragmatic and with Python in mind. No complex graphs, no implicit injections, no type bindings – just picoboxes, and explicit demands!
Because we usually want to decouple our code and Python lack of clean and pragmatic solutions (even third parties).
First
.. code:: bash
$ [sudo] python -m pip install picobox
and then
.. code:: python
import picobox
import requests
@picobox.pass_("conf")
@picobox.pass_("requests", as_="session")
def get_resource(uri, session, conf):
return session.get(conf["base_uri"] + uri)
box = picobox.Box()
box.put("conf", {"base_uri": "http://example.com"})
box.put("requests", factory=requests.Session, scope=picobox.threadlocal)
with picobox.push(box):
get_resource("/resource", requests.Session(), {})
get_resource("/resource", requests.Session())
get_resource("/resource")
FAQs
Dependency injection framework designed with Python in mind.
We found that picobox 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.
Product
Socket Fix 2.0 brings targeted CVE remediation, smarter upgrade planning, and broader ecosystem support to help developers get to zero alerts.
Security News
Socket CEO Feross Aboukhadijeh joins Risky Business Weekly to unpack recent npm phishing attacks, their limited impact, and the risks if attackers get smarter.
Product
Socket’s new Tier 1 Reachability filters out up to 80% of irrelevant CVEs, so security teams can focus on the vulnerabilities that matter.