Skip to main content
latest version available on PyPI Travis Build Status Test Coverage Report

A reusable Django app that exposes a ReSTful Web API for interacting with CloudBridge providers. The structure of the API mirrors the organisation of CloudBridge’s API and allows for creating, retrieving and updating CloudBridge resources.

Documentation

The full documentation is at https://djcloudbridge.readthedocs.io.

Quickstart

Install djcloudbridge:

pip install djcloudbridge

Add it to your INSTALLED_APPS:

INSTALLED_APPS = (
    ...
    'djcloudbridge.apps.DjangoCloudbridgeConfig',
    ...
)

Add djcloudbridge’s URL patterns:

from djcloudbridge import urls as djcloudbridge_urls


urlpatterns = [
    ...
    url(r'^', include(djcloudbridge_urls)),
    ...
]

And finally, the following settings are recommended in your settings.py

REST_FRAMEWORK = {
    'PAGE_SIZE': 50,
    'DEFAULT_PAGINATION_CLASS': 'rest_framework.pagination.PageNumberPagination',
    'DEFAULT_AUTHENTICATION_CLASSES': (
        'rest_framework.authentication.SessionAuthentication',
        'rest_framework.authentication.TokenAuthentication'
    )
}

REST_AUTH_SERIALIZERS = {
    'USER_DETAILS_SERIALIZER': 'djcloudbridge.serializers.UserSerializer'
}

REST_SESSION_LOGIN = True

# **Make sure to change** the value for ``FERNET_KEYS`` variable
# because it is used to encrypt sensitive database fields.
FERNET_KEYS = [
    'new key for encrypting'
]

Running the API Locally

You can run a test server to browse the API endpoints locally. DJCloudBridge is based on Python 3.6 and although it may work on older Python versions, 3.6 is the only supported version. Use of virtualenv is also highly advised.

To get started, simply register the provider connection information under the relevant cloud model (e.g. AWS, Azure, GCE, OpenStack) in Django Admin. Then create a User Profile under the User Profile model. Finally, use the API browser at http://localhost:8000/clouds to view the cloud you registered and interact with cloud resources for that provider.

  1. Checkout djcloudbridge and create environment

$ mkdir djcloudbridge && cd djcloudbridge
$ virtualenv -p python3.6 venv --prompt "(djcloudbridge)" && source venv/bin/activate
$ git clone https://github.com/cloudve/djcloudbridge.git
$ cd djcloudbridge
$ pip install -r requirements.txt
$ python manage.py migrate
$ python manage.py createsuperuser
$ python manage.py runserver
  1. Visit http://127.0.0.1:8000/admin/ to define your cloud connection settings.

  2. Visit http://127.0.0.1:8000/clouds/ to explore the API.

Features

  • TODO

Running Tests

Does the code actually work?

source <YOURVIRTUALENV>/bin/activate
(myenv) $ pip install tox
(myenv) $ tox

Credits

Tools used in rendering this package:

History

0.1.0 (2017-10-04)

  • First release on PyPI.

0.2.0 (2017-11-15)

  • Updated AWS cloud model to reflect cloudbridge changes.

  • Minor bug fixes

0.3.0 (2017-12-17)

  • Moved azure resource group, storage account and vm_default_username to credentials

  • Changed status to beta

Metadata

Release files for djcloudbridge 0.3.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for djcloudbridge 0.3.1
File Size Uploaded Provenance
djcloudbridge-0.3.1.tar.gz 26.1 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for djcloudbridge 0.3.1
File Interpreter ABI Platform
djcloudbridge-0.3.1-py2.py3-none-any.whl Python 3, Python 2 none any Details

Total release size: 56.1 kB

Release files / djcloudbridge-0.3.1.tar.gz

Download URL djcloudbridge-0.3.1.tar.gz
Size 26.1 kB
Tags Source
SHA-256 checksum
How to use checksums
55f3d6d67ad0cf081e60ea8071563f4a90548434bfa5fcff4340fed1f574bece
BLAKE2b-256 checksum
How to use checksums
a3259b409c0774cba7faa50170e3a4762fd1828e83164223027029ba1808c8a6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / djcloudbridge-0.3.1-py2.py3-none-any.whl

Download URL djcloudbridge-0.3.1-py2.py3-none-any.whl
Size 30.0 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
7724d0b03e6d321156f185f270eee9610d554c4cac884c3378eaf82413fa8eef
BLAKE2b-256 checksum
How to use checksums
adbe003cf6b44c4c30dc72045746e148aba271c205badfda40c05c39d014bba8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for djcloudbridge 0.3.1

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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page