Skip to main content

A tiny library for describing data as a resource

Project description

DS Platform :: Vulcan

A tiny python library for expressing data as a resource.

Installing / Getting started

A quick introduction of the minimal setup you need to get a hello world up & running.

pip install CSGVulcan
from CSGVulcan import VulcanResource, VulcanAPI

class MyNewResource(VulcanResource):
    def __init__(self, resource, name=__file__):
        self.super().__init__(resource, name=name)

    def init(self, _context):
        return "Init"

    def  fetch_one(self, _context):
        return "Fetch One"

    def fetch_all(self, _context):
        return "Fetch All"

my_new_resource = MyNewResource()
my_new_resource_api = VulcanAPI(resource=my_new_resource)
# VulcanAPI.run is a proxy for Flask.run, therefore accepts the same arguments
my_new_resource_api.run(port=8080, debug=True)

CSGVulcan will then spin up a Flask Web Server at 127.0.0.1:8080 with the following routes available for consumption.

  • /api/ping
  • /api/fetch-one
  • /api/fetch-all

For more detailed examples please see the examples directory

Developing

If you're interested in developing and contributing to Vulcan, first, clone this project from Github. Secondly, set up your local environemnt for develpment. It is recommended to create a python virtual environment to manage your dependencies, here is how to do that.

Create and activate your virtualenv.

python -m venv venv
source ./venv/bin/activate

Pip install the depdencies

pip install -r requirements.txt

Features

  • Provides a simple and consistent interface for describing data from external resources.
  • Once defined, your VulcanResource is then easily converted into a REST API.

Contributing

If you'd like to contribute, please fork the repository and use a feature branch. Pull requests are warmly welcomed.

Vulcan is a tool designed to serve others, so any and all feedback is expected and encouraged. We aim to create a better pattern for accessing data, if you have ideas, contribute them.

Styleguide

Vulcan is written using autopep8 and pylint, it is recommended to leverage those to allow for consistent styling of source code.

Links

Though not exhaustive, here is a list of useful links that may help in developing an understanding of Vulcan and what it is comprised of.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

CSGVulcan-0.3.2.tar.gz (6.1 kB view details)

Uploaded Source

Built Distribution

CSGVulcan-0.3.2-py3-none-any.whl (6.5 kB view details)

Uploaded Python 3

File details

Details for the file CSGVulcan-0.3.2.tar.gz.

File metadata

  • Download URL: CSGVulcan-0.3.2.tar.gz
  • Upload date:
  • Size: 6.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.19.1 setuptools/40.5.0 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.6.5

File hashes

Hashes for CSGVulcan-0.3.2.tar.gz
Algorithm Hash digest
SHA256 755807e24d31839e1cb624d915010d2741d3daf2aff9b7c0d33b9bcea7a8036f
MD5 a6ce15559a38e565500925a768849141
BLAKE2b-256 c85d5d5ff0dcd7cb0f6bb5149792dde106ee63a62a9fe607deae8466976d3bc3

See more details on using hashes here.

File details

Details for the file CSGVulcan-0.3.2-py3-none-any.whl.

File metadata

  • Download URL: CSGVulcan-0.3.2-py3-none-any.whl
  • Upload date:
  • Size: 6.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.19.1 setuptools/40.5.0 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.6.5

File hashes

Hashes for CSGVulcan-0.3.2-py3-none-any.whl
Algorithm Hash digest
SHA256 8f9db014e5eb36f17d9e056021743604fd5ac2df2e671feda8e4b8bb7fe0338a
MD5 71acebc3e290714719ff53a7b98c5ceb
BLAKE2b-256 35f8f701b6fd0c655825b0344626958065ee729614174761e988415f605f673e

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page