semvec/pypi-packages huggingface dataset:
slack 0.0.2
a DI container
License: MIT
Keywords: DI Container

# slack

a DI Container

## register and provide

```python
from slack import Container

c = Container()

class Component:
    def __init__(self):
        pass

c.register('component', Component)

c1 = c.provide('component')
c2 = c.provide('component')  # c1 is c2
```

## dependency inject

```python
class Component:
    def __init__(self, dep1, dep2):
        pass

c.register('dep1', Dep1)
c.register('dep2', Dep2)
c.register('component', Component)
c.provide('component')
```

## partial inject

```python
class Component:
    def __init__(self, dep1, dep2):
        pass

NewComponent = c.inject(Component, 'dep1')

c = NewComponent(dep2)
```

## using decorator

```python
c.register('comp1')
def comp1(dep1, dep2):
    return SomeClass()
```

## apply

```python
def fn(a, b):
    pass

@c.register('b')
def provide_b():
    pass

c.apply(fn, a=val)
```

## groups and reset

```python
@c.register('comp', group='once')
class Component:
    pass

comp1 = c.provide('comp')
comp2 = c.provide('comp') # comp1 is comp2

c.reset('once')

comp3 = c.provide('comp') # comp3 is not comp2
```
Adept 0.0.2
Simple binding for Adept
License: MIT
Keywords: adept,image,resize,processing

## Adept 

### Installation

`pip install git+ssh://git@github.com/fictivekin/adept-python.git`

### Using the package

Import the Adept class from the package, pass through your account credentials

```
from adept import Adept
a = Adept(
    accound_id='9b5dd41deff8ae7e3767fc6566cb25ff3ca66438',
    account_key='251692b3899f1e30fe4b7037185488aad37c46f8',
    cloudfront_hostname='some.cloudfront.host.com'
)
```

You can then generate a URL for given image operations on an S3 asset (and specified bucket) or image URL.

An example using an S3 asset:

```
operations = ['maxwidth-400', 'cropcenter-400x300']
a.generate_url(
    bucket='gimmebar-assets',
    asset_key='526fc2761c899.jpg',
    operations=operations,
)
```
pipa 0.1.0
Simple HTTPS PyPI server
License: MIT

Pipa
====

Pipa is a sparten local PyPI server.

It requires Python 3, and runs over self-signed SSL.

This means pip won't give you any warnings when using it.

NOTE: It does *not* currently fetch from PyPI for other packages.

Usage
-----

1. Find help on any pipa command with `pipa <command> -h`.

2. Initialize

   run ``pipa init`` to create a packages folder, server certificates,
   and configuration file (``pipa.cfg``)

3. Add a user

   use ``pipa user -a <username> <password>`` to add a new user to the confg
   that will be able to upload files to pipa.

4. Run the server

   Run ``pipa serve`` to serve with configuration from your config.

5. Configure pip and distutils

   To install packages from pipa, pip needs to be given pipa's index url,
   and its cert bundle to authenticate with. This (``bundle.pem``) should be
   available to both pip and the server; you can copy it to where you need.
   The index url should be printed when starting the server.
   You can specify these with the flags ``--index-url=...`` and ``--cert=...``;
   or the environment variables ``PIP_INDEX_URL`` and ``PIP_CERT``;
   or in a `configuration file`_.

   pipa allows uploading packages. To configure this, edit your ``~/.pypirc``
   to look something like this::

    [distutils]
    index-servers =
        pypi
        pipa

    [pypi]
    username: my_pypi.python.org_user
    password: pass

    [pipa]
    repository: https://localhost:5351/upload/
    username: <username>
    password: <password>

   Making use of the values you entered in step 2. See `here`_ for
   more info.

6. Upload packages using ``python setup.py sdist upload -r pipa``, and then
   install them again when needed.


.. _configuration file: http://www.pip-installer.org/en/latest/user_guide.html#configuration
.. _here: http://docs.python.org/2/distutils/packageindex.html#the-pypirc-file

Informations
------------

Q & A
~~~~~

*Q: Can you add caching from PyPI?*

A: I plan to in the future. Pull requests are very welcome. In the mean time,
also check out `devpi`_ and `pypimirror`_.

*Q: Why another PyPI Developer Cache?*

A: I couldn't see one that served over SSL out of the box, and/or that you could
upload to from setup.py

*Q: Why Python 3 only?*

A: Because it's nicer to code in and I want more Python 3 apps, so I made one.

*Q: Are pull requests welcome?*

A: Indeed they are!

.. _devpi: http://doc.devpi.net
.. _pypimirror: https://pypi.python.org/pypi/pypimirror/

------------------

License: MIT

Code: https://github.com/Ivoz/pipa

Issues: https://github.com/Ivoz/pipa/issues