{"id":20875046,"url":"https://github.com/servicestack/gistcafe-python","last_synced_at":"2025-08-30T06:33:10.909Z","repository":{"id":57434371,"uuid":"324934213","full_name":"ServiceStack/gistcafe-python","owner":"ServiceStack","description":"gist.cafe utils for Python","archived":false,"fork":false,"pushed_at":"2020-12-28T23:15:27.000Z","size":9,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-03-09T22:07:07.637Z","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":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ServiceStack.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-12-28T06:48:52.000Z","updated_at":"2020-12-28T23:15:29.000Z","dependencies_parsed_at":"2022-08-27T23:10:38.021Z","dependency_job_id":null,"html_url":"https://github.com/ServiceStack/gistcafe-python","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/ServiceStack%2Fgistcafe-python","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ServiceStack%2Fgistcafe-python/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ServiceStack%2Fgistcafe-python/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ServiceStack%2Fgistcafe-python/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ServiceStack","download_url":"https://codeload.github.com/ServiceStack/gistcafe-python/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243249011,"owners_count":20260768,"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-18T06:41:44.405Z","updated_at":"2025-03-12T16:16:08.582Z","avatar_url":"https://github.com/ServiceStack.png","language":"Python","readme":"Useful utils for [gist.cafe](https://gist.cafe) Python Apps.\n\n## Usage\n\nSimple usage example:\n\n```python\nimport requests\nimport operator\n\nfrom dataclasses import dataclass, field\nfrom dataclasses_json import config, dataclass_json, Undefined\nfrom typing import Optional\nfrom gistcafe import inspect\n\n@dataclass_json(undefined=Undefined.EXCLUDE)\n@dataclass\nclass GithubRepo:\n    name: str\n    description: Optional[str] = None\n    homepage: Optional[str] = None\n    lang: Optional[str] = field(metadata=config(field_name=\"language\"),default=None)\n    watchers: Optional[int] = 0\n    forks: Optional[int] = 0\n\norgName = \"python\"\nresponse = requests.get(f'https://api.github.com/orgs/{orgName}/repos')\norgRepos = GithubRepo.schema().loads(response.text, many=True)\norgRepos.sort(key=operator.attrgetter('watchers'), reverse=True)\n\nprint(f'Top 3 {orgName} Repos:')\ninspect.printdump(orgRepos[0:3])\n\nprint(f'\\nTop 10 {orgName} Repos:')\ninspect.printdumptable(orgRepos[0:10],headers=['name','lang','watchers','forks'])\n\ninspect.vars({ 'orgRepos': orgRepos })\n```\n\nWhich outputs:\n\n```\nTop 3 python Repos:\n[\n    {\n        name: mypy,\n        description: Optional static typing for Python 3 and 2 (PEP 484),\n        homepage: http://www.mypy-lang.org/,\n        lang: Python,\n        watchers: 9638,\n        forks: 1564\n    },\n    {\n        name: peps,\n        description: Python Enhancement Proposals,\n        homepage: https://www.python.org/dev/peps/,\n        lang: Python,\n        watchers: 2459,\n        forks: 921\n    },\n    {\n        name: typeshed,\n        description: Collection of library stubs for Python, with static types,\n        homepage: ,\n        lang: Python,\n        watchers: 1942,\n        forks: 972\n    }\n]\n\nTop 10 python Repos:\n+--------------+-----------+------------+---------+\n| name         | lang      |   watchers |   forks |\n|--------------+-----------+------------+---------|\n| mypy         | Python    |       9638 |    1564 |\n| peps         | Python    |       2459 |     921 |\n| typeshed     | Python    |       1942 |     972 |\n| pythondotorg | Python    |       1038 |     432 |\n| asyncio      |           |        945 |     178 |\n| typing       | Python    |        840 |     130 |\n| raspberryio  | Python    |        217 |      38 |\n| typed_ast    | C         |        171 |      43 |\n| planet       | Python    |        100 |     145 |\n| psf-salt     | SaltStack |         87 |      50 |\n+--------------+-----------+------------+---------+\n```\n\nWhilst `inspect.vars()` lets you view variables in [gist.cafe](https://gist.cafe) viewer:\n\n![](https://raw.githubusercontent.com/ServiceStack/gist-cafe/main/docs/images/vars-orgRepos-python.png)\n\nView and execute Python gists with [gist.cafe](https://gist.cafe), e.g: [gist.cafe/2b11948d23e051396d62bb7853aad674](https://gist.cafe/2b11948d23e051396d62bb7853aad674).\n\n## Features and bugs\n\nPlease file feature requests and bugs at the [issue tracker](https://github.com/ServiceStack/gistcafe-pyhon/issues).","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fservicestack%2Fgistcafe-python","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fservicestack%2Fgistcafe-python","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fservicestack%2Fgistcafe-python/lists"}