{"id":13502613,"url":"https://github.com/tryolabs/python-simple-getty","last_synced_at":"2025-03-29T12:32:17.006Z","repository":{"id":7551915,"uuid":"8904938","full_name":"tryolabs/python-simple-getty","owner":"tryolabs","description":null,"archived":false,"fork":false,"pushed_at":"2013-03-21T22:18:39.000Z","size":128,"stargazers_count":8,"open_issues_count":0,"forks_count":2,"subscribers_count":5,"default_branch":"master","last_synced_at":"2024-10-31T22:32:23.403Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/tryolabs.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":"2013-03-20T13:37:51.000Z","updated_at":"2018-01-19T01:49:17.000Z","dependencies_parsed_at":"2022-09-22T13:42:31.368Z","dependency_job_id":null,"html_url":"https://github.com/tryolabs/python-simple-getty","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tryolabs%2Fpython-simple-getty","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tryolabs%2Fpython-simple-getty/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tryolabs%2Fpython-simple-getty/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tryolabs%2Fpython-simple-getty/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tryolabs","download_url":"https://codeload.github.com/tryolabs/python-simple-getty/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246186886,"owners_count":20737457,"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-07-31T22:02:19.634Z","updated_at":"2025-03-29T12:32:16.720Z","avatar_url":"https://github.com/tryolabs.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"Python-simple-getty\n===================\n\nDescription\n-----------\n\n__Python-simple-getty__ is a very simple wrapper of Getty's REST API.\n__Python-simple-getty__ allows you to `search` for images, `get_image_details` \nfor a particular image, and finally `buy` an image. Session handling is done \nautomatically, all you need to do is provide your credentials and the rest will \nbe done for you.\n\n### What Python-simple-getty is:\n* Easy to use.\n* Easy to integrate into your own python application.\n* Simple code that can be easily modified and adapted to what you need.\n\n### What Python-simple-getty is not:\n* A thorough implementation of the Getty API.\n\nUsage\n-----\n\n1. Download `getty.py` and place it where your sources are.\n2. Install the requirements with `pip install -r requirements.txt`\n3. Import the `Session` class like so:\n\n        from getty import Session\n\n4. Create a new instance of the `Session` class, passing it your credentials:\n\n        s = Session('system_id', 'system_pass', 'user_name', 'user_pass')\n\n5. Search for images. You'll have to specify the keywords to search for, how \nmany items to return, and what the index of the first item is:\n\n        s.search('Someone', items=50, from_item=1)\n\n6. You can use the `get_image_details` to get some metadata for the search \nresults you got. You can call it with just one ID as a `String` or give it \nmultiple IDs in a list:\n\n        s.get_image_details([one_id, another_id, ...])\n\n7. Finally you can buy an image specifying it's ID and a optionaly a preferred \nsize in bytes of the image to buy:\n\n        s.buy(ID_to_buy, 1024 * 1024)\n\n\nGetting extra metadata\n----------------------\n\nIn case you need to get some more metadata when getting and images details, the\n`__get_image_details` can be modified to do this easily. Just add the fields \nyou want to the `props` dictionay. You can find all available fields \n[here](https://github.com/gettyimages/connect/blob/master/documentation/endpoints/search/GetImageDetails.md#response)\n\nLinks\n-----\n\nIf you feel this wrapper is too simple for what you need, Getty's API \ndocumentation can be found [here](https://github.com/gettyimages/connect).\n\nMore information\n----------------\n\n* Date: 03-21-2013\n* Version: 0.1\n* Authors:\n  - Mauro de Carvalho - Tryolabs \u003cmauro@tryolabs.com\u003e\n  - Alejandro Martínez - Tryolabs \u003calejandro@tryolabs.com\u003e\n* Website: https://github.com/tryolabs/python-simple-getty\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftryolabs%2Fpython-simple-getty","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftryolabs%2Fpython-simple-getty","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftryolabs%2Fpython-simple-getty/lists"}