Skip to content

Instantly share code, notes, and snippets.

API Design Guidelines

Introduction

The PayPal platform is a collection of reusable services that encapsulate well-defined business capabilities. Developers are encouraged to access these capabilities through Application Programming Interfaces (APIs) that enable consistent design patterns and principles. This facilitates a great developer experience and the ability to quickly compose complex business processes by combining multiple, complementary capabilities as building blocks.

PayPal APIs follow the [RESTful][0] architectural style as much as possible. To support our objectives, we have developed a set of rules, standards, and conventions that apply to the design of RESTful APIs. These have been used to help design and maintain hundreds of APIs and have evolved over several years to meet the needs of a wide variety of use cases.

We are sharing these guidelines to help propagate good API design practices in general. We have pulled extensively from the broader community and believe that it is importan

@mmxw
mmxw / runner.py
Last active September 18, 2020 18:21 — forked from carljm/runner.py
Unittest2 test discovery and real dotted-path named test selection for Django
"""
An alternative Django ``TEST_RUNNER`` which uses unittest2 test discovery from
a base path specified in settings, rather than requiring all tests to be in
``tests`` module of an app.
If you just run ``./manage.py test``, it'll discover and run all tests
underneath the ``TEST_DISCOVERY_ROOT`` setting (a path). If you run
``./manage.py test full.dotted.path.to.test_module``, it'll run the tests in
that module (you can also pass multiple modules).
@mmxw
mmxw / structlog.py
Created June 5, 2020 14:00
django-structlog example
from https://gitlab.com/MarkusH/django-structlog/-/blob/master/airline/airline/structlog.py
import datetime
import decimal
import functools
import time
import uuid
import structlog
@mmxw
mmxw / reserved usernames (backup debugging options)
Last active May 31, 2020 10:57
reserved usernames (backup debugging options)
from @vitorfs: forbidden-usernames/parsifal/authentication/forms.py /
also see: https://github.com/shouldbee/reserved-usernames
from django import forms
from django.core.exceptions import ValidationError
from django.contrib.auth.models import User