creepo package
Submodules
httpproxy module
The httpproxy module exposes HttpProxy
, whose httpproxy.rest_proxy()
method handles each request.
By default the httpproxy module expects to support secure transmission protocols.
- class httpproxy.HttpProxy(config, key)[source]
Bases:
object
The http proxy
By default this class does not persist anything.
Enable persistence by setting the global configuration option no_cache = False
- Parameters:
config – The global Creepo config
key – The storage key AND path prefix
- property base
The base path to storage
- property kind
The kind of proxy
- property no_cache
The no_cache property for this
Proxy
- rest_proxy(environ, start_response)[source]
The rest_proxy method is the work engine for everything
- Parameters:
environ – The request Dictionary
start_response – The CherryPy callback
When environ contains a callback function that callback will be called after the initial request.
The callback might change the content. For this reason we replace the Content-Length header after the callback.
The (potentially modified) response is returned to the caller as a byte array at request[‘response’]
simpleproxy module
A simple proxy which does no callback.
This class supports docker, maven, and apk proxies
- class simpleproxy.SimpleProxy(config, key)[source]
Bases:
HttpProxy
A simple proxy for use with any repository which implements a simple REST interface, such as maven and apk. In the current code it is also used for docker, although docker requires a global kludge (docker must only be mounted at /v2)
- Parameters:
config – The global Creepo config
key – The storage key prefix. The key is also the @cherrypy.expose endpoint, below
composerproxy module
Composer - proxy https://packagist.org for use by php developers
- class composerproxy.ComposerProxy(config)[source]
Bases:
object
Default configuration: { ‘registry’ : ‘https://packagist.org’ }
Exposed at endpoint /p2
When no_cache is not True then we will host selected ‘source’ and ‘dist’ packages
Configure a project to use Creepo by adding this to composer.json:
{ "repositories": [ { "type": "composer", "url": "https://${HOST_IP}:4443/p2/" } ], }
npmproxy module
An npm proxy
pipproxy module
The pip proxy