Skip to main content

A Python RAML parser

Project description

ramlfications: RAML reference implementation in Python

Latest Version Development Status License Current coverage Supported Python versions

Note: this project has been discontinued at Spotify and will be transferred to a new maintainer, we are currently finishing the transfer of this repository and the associated pypi package.

Requirements and Installation

User Setup

The latest stable version can be found on PyPI, and you can install via pip:

$ pip install ramlfications

ramlfications runs on Python 3.10+, and PyPy. Linux , OS X and Windows are supported. Currently, only RAML 0.8 is supported, but there are plans to support 1.0.

Continue onto usage to get started on using ramlfications.

Developer Setup

If you’d like to contribute or develop upon ramlfications, be sure to read How to Contribute first.

You can see the progress of ramlfications on our public project management page.

System requirements:

  • C Compiler (gcc/clang/etc.)

  • If on Linux - you’ll need to install Python headers (e.g. apt-get install python-dev)

  • Python 3.10+, or PyPy

  • virtualenv

Here’s how to set your machine up:

$ git clone git@github.com:jdiegodcp/ramlfications
$ cd ramlfications
$ virtualenv env
$ source env/bin/activate
(env) $ pip install -r dev-requirements.txt

Run Tests

If you’d like to run tests for all supported Python versions, you must have all Python versions installed on your system. I suggest pyenv to help with that.

To run all tests:

(env) $ tox

To run a specific test setup (options include: py310, py311, py312, pypy, flake8, verbose, manifest, docs, setup, setupcov):

(env) $ tox -e py310

To run tests without tox:

(env) $ py.test
(env) $ py.test --cov ramlfications --cov-report term-missing

Build Docs

Documentation is build with Sphinx, written in rST, uses the Read the Docs theme with a slightly customized CSS, and is hosted on Read the Docs site.

To rebuild docs locally, within the parent ramlfications directory:

(env) $ tox -e docs

or:

(env) $ sphinx-build -b docs/ docs/_build

Then within ramlfications/docs/_build you can open the index.html page in your browser.

Project History

Ramlfications was originally created by Spotify engineer github.com/econchick, but is currently not in use at Spotify. The project was discontinued in April 2022 and transferred to an external maintainer.

Still have issues?

Feel free to drop by #ramlfications on Freenode (webchat) or ping via Twitter[X]. “jdiegodcp” is the maintainer, a.k.a jdiegodcp on GitHub.

Changelog

0.1.9 (2015-12-24)

Happy holidays!

  • Fix resource type inheritance (Issue 23 & Issue 47)

  • Preserve order of baseUriParameters and uriParameters in API root and resource nodes (Issue 37)

  • Fix missing URI parameters if not defined/declared inline (Issue 56)

  • Fix how arguments are passed into pytest in setup.py (PR 55 - thank you matiasb!)

0.1.8 (2015-10-07)

  • Fix incorrect/incomplete behavior optional properties of Resource Types (Issue 44).

  • Fix protocols inheritance (Issue 44).

  • Partial fix for Issue 23 - incorrect resource type inheritance

    • When a resource type is defined with one method that is optional and is applied to a resource that does not have that method defined, the resource’s method should not inherit from the optional method

    • When a resource inherits a resource type but explicitly defines named parameters, the named parameters in the resource should overwrite those that are inherited

0.1.7 (2015-08-20)

Added:

0.1.6 (2015-08-03)

Added:

  • waffle.io page to documentation for project management overview

Fixed:

  • Parse errors when RAML file would have empty mappings (Issue 30)

  • Switch yaml.Loader to yaml.SafeLoader (Issue 26)

  • Update documentation to reflect rearrangement of errors (Issue 27)

  • Remove default parameter from being required for baseURIParameters (Issue 29)

  • Pin mock library for tox tests (Issue 22)

  • Experimenting with speeding up pypy tests within tox on Travis

0.1.5 (2015-06-05)

Fixed:

  • Configuration parsing for validation/production. Thanks vrajmohan!

  • Parsing of response bodies (fixes Issue 12). Thanks Igor!

0.1.4 (2015-05-27)

Added:

  • Support for recursive !includes in RAML files (0.1.3 would handle the error, now actually supports it. Thanks Ben for your PR!).

0.1.3 (2015-05-14)

Added:

  • New #ramlfications channel on freenode (web chat link)! Come chat, I’m lonely.

  • Documentation for configuration and the update command.

Fixed:

  • Handle recursive/cyclical !includes in RAML files for now (PR)

  • Encoding issues from upgrading to tox 2.0

  • tests/test_utils.py would create ramlfications/data/supported_mime_types.json; now mocked out.

0.1.2 (2015-04-21)

Fixed:

  • pypy 2.5.x would fail a parser test because order of list was not expected

0.1.1 (2015-04-21)

New:

  • Added ability to parse IANA-supported MIME media types

  • Added update command for user to update IANA-supported MIME types if/when needed

0.1.0a1 (2015-04-18)

Initial alpha release of ramlfications!

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

ramlfications-0.2.2.tar.gz (1.2 MB view details)

Uploaded Source

Built Distribution

ramlfications-0.2.2-py2.py3-none-any.whl (83.1 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file ramlfications-0.2.2.tar.gz.

File metadata

  • Download URL: ramlfications-0.2.2.tar.gz
  • Upload date:
  • Size: 1.2 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/4.0.2 CPython/3.11.8

File hashes

Hashes for ramlfications-0.2.2.tar.gz
Algorithm Hash digest
SHA256 c1c41de63ef8cbb774c4579697096171e663f798b1526bf9ba99efffa465d5ec
MD5 f6672d83c54e5a9254536e1d562594b3
BLAKE2b-256 c0c2a81405ecdc6c28dbd36a6268134f5fa8282969a25cec139e560f2d4ca107

See more details on using hashes here.

File details

Details for the file ramlfications-0.2.2-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for ramlfications-0.2.2-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 1a6ab382d04b2c915c5b8f46e8c16f6125108621af5f62f24ef7f50cf31b7eb3
MD5 e54f4c6a29481b16bb4548a55776a735
BLAKE2b-256 63044fa175deb5d24c331cccb716bb7a0e935544be9256b1e723f4130162dd0f

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