<commit_before>=========
 Pinject
=========

Pinject is a dependency injection library for python.

The primary goal of Pinject is to help you assemble objects into graphs in an
easy, maintainable way.

If you are already familiar with other dependency injection libraries, you may
want to read the condensed summary section at the end, so that you get an idea
of what Pinject is like and how it might differ from libraries you're used to.

There is a changelog of differences between released versions near the end of
this README.

Why Pinject?
============

If you're wondering why to use a dependency injection library at all: if
you're writing a lot of object-oriented code in python, then it will make your
life easier.  See, for instance:

* https://en.wikipedia.org/wiki/Dependency_injection
* http://lmgtfy.com/?q=dependency+injection

If you're wondering why to use Pinject instead of another python dependency
injection library, a few of reasons are:

* Pinject is much easier to get started with.  Forget having to decorate your code with ``@inject_this`` and ``@annotate_that`` just to get started.  With Pinject, you call ``new_object_graph()``, one line, and you're good to go.
* Pinject is a *pythonic* dependency injection library.  Python ports of other libraries, like Spring or Guice, retain the feel (and verbosity) of being designed for a statically typed language.  Pinject is designed from the ground up for python.
* The design choices in Pinject are informed by several dependency injection experts working at Google, based on many years of experience.  Several common confusing or misguided features are omitted altogether from Pinject.
* Pinject has great error messages.  They tell you exactly what you did wrong, and exactly where.  This should be a welcome change from other dependency frameworks, with their voluminous and yet inscrutable stack traces.

Look at the simplest getting-started examples for Pinject and for other
similar libraries.  Pinject should be uniformly easier to use, clearer to
read, and less boilerplate that you need to add.  If you don't find this to be
the case, email!

Installation
============

The easiest way to install Pinject is to get the latest released version from
PyPI:

.. code-block::

    sudo pip install pinject

You can also check out all the source code, including tests, designs, and
TODOs:

.. code-block::

   git clone https://github.com/google/pinject

Basic dependency injection
==========================

The most important function in the ``pinject`` module is
``new_object_graph()``.  This creates an ``ObjectGraph``, which you can use to<commit_msg>Tweaks README ReST to make PyPI happy.<commit_after>=========
 Pinject
=========

Pinject is a dependency injection library for python.

The primary goal of Pinject is to help you assemble objects into graphs in an
easy, maintainable way.

If you are already familiar with other dependency injection libraries, you may
want to read the condensed summary section at the end, so that you get an idea
of what Pinject is like and how it might differ from libraries you're used to.

There is a changelog of differences between released versions near the end of
this README.

Why Pinject?
============

If you're wondering why to use a dependency injection library at all: if
you're writing a lot of object-oriented code in python, then it will make your
life easier.  See, for instance:

* https://en.wikipedia.org/wiki/Dependency_injection
* http://lmgtfy.com/?q=dependency+injection

If you're wondering why to use Pinject instead of another python dependency
injection library, a few of reasons are:

* Pinject is much easier to get started with.  Forget having to decorate your code with ``@inject_this`` and ``@annotate_that`` just to get started.  With Pinject, you call ``new_object_graph()``, one line, and you're good to go.
* Pinject is a *pythonic* dependency injection library.  Python ports of other libraries, like Spring or Guice, retain the feel (and verbosity) of being designed for a statically typed language.  Pinject is designed from the ground up for python.
* The design choices in Pinject are informed by several dependency injection experts working at Google, based on many years of experience.  Several common confusing or misguided features are omitted altogether from Pinject.
* Pinject has great error messages.  They tell you exactly what you did wrong, and exactly where.  This should be a welcome change from other dependency frameworks, with their voluminous and yet inscrutable stack traces.

Look at the simplest getting-started examples for Pinject and for other
similar libraries.  Pinject should be uniformly easier to use, clearer to
read, and less boilerplate that you need to add.  If you don't find this to be
the case, email!

Installation
============

The easiest way to install Pinject is to get the latest released version from
PyPI:

.. code-block:: shell

    sudo pip install pinject

You can also check out all the source code, including tests, designs, and
TODOs:

.. code-block:: shell

   git clone https://github.com/google/pinject

Basic dependency injection
==========================

The most important function in the ``pinject`` module is
``new_object_graph()``.  This creates an ``ObjectGraph``, which you can use to
{'fraction_non_alphanumeric': 0.07440195893765304, 'fraction_numerical': 0.0, 'mean_word_length': 4.566037735849057, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6453232', 'n_tokens_mistral': 1358, 'n_tokens_neox': 1289, 'n_words': 769}