Skip to content
This repository was archived by the owner on Nov 3, 2021. It is now read-only.

timofurrer/ramlient

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()

About

Access to a RAML API done right, in Python. (Feasibility)

Topics

Resources

License

Code of conduct

Contributing

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •