Skip to content

Conversation

@yadutaf
Copy link
Contributor

@yadutaf yadutaf commented Apr 5, 2016

And here is the python version of ovh/go-ovh#3. It follows the same design with 3 simple helpers and HTTP Verbs list "constants".

A simple code excerpt being worth a 1000 lines of text, here it is:

# Common authorization patterns
API_READ_ONLY       = ["GET"]
API_READ_WRITE      = ["GET", "POST", "PUT", "DELETE"]
API_READ_WRITE_SAFE = ["GET", "POST", "PUT"]

# Helpers
class ConsumerKeyRequest(object):
    def add_rule(self, method, path): pass
    def add_rules(self, methods, path): pass
    def add_recursives_rules(self, methods, path): pass

ping @rbeuque74 @VincentCasse @gregdel @PouuleT @LukeMarlin

Signed-off-by: Jean-Tiare Le Bigot <jean-tiare.le-bigot@corp.ovh.com>
@VincentCasse
Copy link
Member

LGTM

@VincentCasse VincentCasse merged commit 7a2ae4f into master Apr 7, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants