Access to a RAML API done right, in Python. (Feasibility)
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
ramlient
tests
.gitignore
.pyup.yml
.travis.yml
CODE_OF_CONDUCT.md
CONTRIBUTING.md
LICENSE
MANIFEST.in
README.md
requirements-dev.txt
requirements.txt
setup.cfg
setup.py
tox.ini

README.md

ramlient - RAML client for python

Access to a RAML API done right, in Python.


Build Status codecov Code Health
PyPI version PyPI PyPI


ramlient makes it very easy to access RAML based APIs.

Installation

Use pip to install ramlient:

pip3 install ramlient

Usage

Let's assume you have the following simple RAML file:

#%RAML 0.8
---
title: Example API
baseUri: http://example.com
securitySchemes:
  - basic:
      type: Basic Authentication
/resource:
  displayName: First One
  put:
    responses:
      200:
      201:
      203:
  get:
    description: get the first one
    headers:
      x-custom:
    responses:
      200:
  /{resourceId}:
    description: This is a resource description *with* some _markdown_ embedded in it
    uriParameters:
      resourceId:
        required: true
        description: Which resoure would you like to view
    get:
      queryParameters:
        filter:
          description: What to filter
          type: string
      responses:
        200:

Use ramlient to make easy requests to the routes:

from ramlient import Client

client = Client("api.raml")
response = client.resource.get()
resource = client.resource.resourceId(1).get()