This release is a pre-release and may not be stable for production use.
SPOT - DotCloud environment loader
==================================
Why?
====
When working with DotCloud_ you will more than likely have a developement
environment locally that offers the services your application requires which
are specified in the `build file`_.
Locally one very rarely bother changing the parameters of the services from
their defaults settings but on DotCloud_ your application must read the
`environment file`_.
Hence you end up with a fair amount of boilerplate code in your application
which figures out wether it is running locally or on DotCloud_ and instantiates
the services for you to use accordingly.
Not anymore ... if you don't want to ;)
How?
====
Enters SPOT (named after the French earth observation satellite). SPOT knows
wether your code is running locally or on DotCloud_, exposes each service
parameters under the name you gave it in your `build file`_.
For example if your build file contains a python_ service named www and a redis_
service named cache::
www:
type: python
cache:
type: redis
Then when you instantiate a spot.Dotcloud() object it will expose the cache
services::
>>> import spot
>>> dotcloud = spot.Dotcloud()
>>> isinstance(dotcloud.cache, spot.Redis)
True
When running locally::
>>> dotcloud.cache.host
u'localhost'
But on DotCloud::
>>> dotcloud.cache.host
u'SOMETHING.dotcloud.com'
If you have installed the packages allowing Python to handle the services e.g.
redis_ (and hiredis_), the spot.Dotcloud instance also expose a connection to
the server you can use out of the box::
>>> type(dotcloud.cache.server)
<class 'redis.client.StrictRedis'>
Next?
=====
At this stage only the Redis_ and MongoDB_ services are managed. I will add more
as I *require* them ... or you can contribute and submit new services definition
via pull request ;)
.. _DotCloud: http://dotcloud.com
.. _redis: http://redis.io
.. _python: http://python.org
.. _build file: http://docs.dotcloud.com/guides/build-file/
.. _environment file: http://docs.dotcloud.com/guides/environment/
.. _redis: http://pypi.python.org/pypi/redis
.. _hiredis: http://pypi.python.org/pypi/hiredis
.. _mongodb: http://www.mongodb.org/
Metadata
Release files for spot 0.1a
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| spot-0.1a.tar.gz | 3.9 kB | Without provenance | Details for spot-0.1a.tar.gz |
Release files / spot-0.1a.tar.gz
| Download URL | spot-0.1a.tar.gz |
|---|---|
| Size | 3.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
86a142517513d523258d3ccc08097aeeaab240b9866cf87c07dd8dbc41ef5903
|
|
BLAKE2b-256 checksum How to use checksums |
7abef108566c1d719591902e72064b6779723b90a3e05bd27630856c34a34a35
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for spot 0.1a
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.