Skip to main content

Python parser for RAML.

Project description

pyraml-parser - Python parser to RAML, the RESTful API Modeling Language.

Introduction

Implementation of a RAML parser for Python based on PyYAML. It is compliant with RAML 0.8 http://raml.org/spec.html

Installation

The pyraml package can be installed with pip or easy_install from GIT repository or from tarball.

$ pip install https://github.com/an2deg/pyraml-parser/archive/master.zip

For Python 2.6 packages ordereddict and ‘lxml’ should be installed:

$ pip install ordereddict lxml

Developing pyraml-paser

You may need to install nose, tox and mock packages to run pyraml-parser tests.

Typical installation process for developing purposes:

$ git clone git@github.com:an2deg/pyraml-parser.git $ cd pyraml-parser $ pip install mock $ python setup.py develop

To run tests on all supported python versions:

$ pip install tox $ tox

Or to run tests with nose:

$ pip install nose $ python -m nose

Or to run tests using unittest:

$ python setup.py test

Using pyraml-parser

An instance of the RamlRoot object can be obtained by calling the pyraml.parser.load function:

import pyraml.parser

p = pyraml.parser.load(‘schema.raml’)

print p

MIT LICENSE —

Copyright (c) 2011-2015 Jason Huck, Simon Georget http://opensource.org/licenses/MIT

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

0.1.9 (2019-10-01)

Bugfixes

  • Switch to PyYAML >= 5.1 (@mzagozen)

0.1.8 (2019-05-30)

Bugfixes

  • Pin PyYAML to 3.13 as the last working version (@mzagozen)

  • Use !include content as a string (@mzagozen)

  • Fix unit tests (@mzagozen)

0.1.3 (2015-05-11)

Features

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

pyraml-parser-0.1.9.tar.gz (15.3 kB view details)

Uploaded Source

File details

Details for the file pyraml-parser-0.1.9.tar.gz.

File metadata

  • Download URL: pyraml-parser-0.1.9.tar.gz
  • Upload date:
  • Size: 15.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.3

File hashes

Hashes for pyraml-parser-0.1.9.tar.gz
Algorithm Hash digest
SHA256 97ab78cea9e38e3d1ad647329ee3ca541b6342ff10682f86a5b6492d185ece8f
MD5 cc936d49e7da5249ca06327ce03fd12d
BLAKE2b-256 8064f9f3ce4a2ae82e9c77269ba74cc7b9cd56d0391fc7a71b285b4bd70179d7

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