{"id":18403708,"url":"https://github.com/russellluo/crest","last_synced_at":"2025-04-07T07:32:45.714Z","repository":{"id":23705640,"uuid":"27077948","full_name":"RussellLuo/crest","owner":"RussellLuo","description":"A simple REST client for Python.","archived":false,"fork":false,"pushed_at":"2015-02-27T08:56:56.000Z","size":180,"stargazers_count":8,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-22T14:41:31.159Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/RussellLuo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-11-24T13:59:08.000Z","updated_at":"2019-08-13T15:56:14.000Z","dependencies_parsed_at":"2022-08-05T23:15:39.853Z","dependency_job_id":null,"html_url":"https://github.com/RussellLuo/crest","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RussellLuo%2Fcrest","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RussellLuo%2Fcrest/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RussellLuo%2Fcrest/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RussellLuo%2Fcrest/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/RussellLuo","download_url":"https://codeload.github.com/RussellLuo/crest/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247612509,"owners_count":20966768,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-06T02:47:59.341Z","updated_at":"2025-04-07T07:32:43.803Z","avatar_url":"https://github.com/RussellLuo.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"Crest\n=====\n\nA simple REST client for Python.\n\n\nInstallation\n------------\n\nInstall `Crest` with `pip`:\n\n    $ pip install python-crest\n\nInstall development version from `GitHub`:\n\n    $ git clone https://github.com/RussellLuo/crest.git\n    $ cd crest\n    $ python setup.py install\n\n\nGetting Started\n---------------\n\nCreate an API resource:\n\n    from crest import Resource\n\n    # a simple API\n    api = Resource('http://example.com/api')\n\n    # an API required authentication\n    api = Resource('http://example.com/api', auth=('username', 'password'))\n\n    # GET http://example.com/api\n    api.get()\n\nGet a resource within the API:\n\n    users = api.users\n\n    # GET http://example.com/api/users\n    users.get()\n\n    # GET http://example.com/api/users?name=russell\n    users.get(params={'name': 'russell'})\n\n    # POST http://example.com/api/users (payload: {\"name\": \"russell\"})\n    users.post(json={'name': 'russell'})\n\n    # GET http://example.com/api/users/1\n    users[1].get()\n\n    # PATCH http://example.com/api/users/1 (payload: {\"name\": \"russell\"})\n    users[1].patch(json={'name': 'russell'})\n\nGet a sub resource of `users`:\n\n    operations = users[1].operations\n\n    # GET http://example.com/api/users/1/operations\n    operations.get()\n\n    # GET http://example.com/api/users/1/operations/1\n    operations[1].get()\n\n\nThanks\n------\n\n`Crest` is based on kennethreitz's [requests][1], and is inspired by adnam's [resources][2]. Thank you guys!\n\n\n[1]: https://github.com/kennethreitz/requests\n[2]: https://github.com/adnam/resources\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frussellluo%2Fcrest","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frussellluo%2Fcrest","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frussellluo%2Fcrest/lists"}