{"id":16544597,"url":"https://github.com/msoedov/grph","last_synced_at":"2026-05-05T03:38:04.826Z","repository":{"id":74829853,"uuid":"183050058","full_name":"msoedov/grph","owner":"msoedov","description":"GraphQL client code generator","archived":false,"fork":false,"pushed_at":"2019-05-12T14:32:28.000Z","size":152,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-14T11:17:30.901Z","etag":null,"topics":["code-generator","graphql","graphql-client","python3"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/msoedov.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-04-23T16:00:46.000Z","updated_at":"2019-05-12T14:34:07.000Z","dependencies_parsed_at":null,"dependency_job_id":"68ab24b1-1bc8-485a-baff-b72b060a5cdf","html_url":"https://github.com/msoedov/grph","commit_stats":{"total_commits":43,"total_committers":1,"mean_commits":43.0,"dds":0.0,"last_synced_commit":"101c1dbec4e7029447aba996d8e7e41a32ae2666"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/msoedov%2Fgrph","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/msoedov%2Fgrph/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/msoedov%2Fgrph/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/msoedov%2Fgrph/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/msoedov","download_url":"https://codeload.github.com/msoedov/grph/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241801255,"owners_count":20022390,"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":["code-generator","graphql","graphql-client","python3"],"created_at":"2024-10-11T19:03:36.894Z","updated_at":"2026-05-05T03:38:04.788Z","avatar_url":"https://github.com/msoedov.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# GRPH\n\nGenerate a python client code from graphql spec. It allows clients to define the structure of the data required, and exactly the same structure of the data is returned from the server. It is a strongly typed runtime which allows clients to dictate what data is needed.\n\n### Usage\n\n```python\npython -m grph examples/github.json \u003e examples/github_lib.py\n```\n\n### Sample of generated code\n\n```python\nclass Repository(node):\n    \"\"\"\n    A repository contains the content for a project.\n    \"\"\"\n\n    codeOfConduct: CodeOfConduct = None\n    createdAt: DateTime = None\n    databaseId: int = None\n    defaultBranchRef: Ref = None\n    description: str = None\n    descriptionHTML: HTML = None\n    diskUsage: int = None\n    forkCount: int = None\n    hasIssuesEnabled: bool = None\n    hasWikiEnabled: bool = None\n    homepageUrl: URI = None\n    id: ID = None\n    isArchived: bool = None\n    isFork: bool = None\n    isLocked: bool = None\n    isMirror: bool = None\n    isPrivate: bool = None\n    license: str = None\n    licenseInfo: License = None\n    lockReason: RepositoryLockReason = None\n    mirrorUrl: URI = None\n    name: str = None\n    nameWithOwner: str = None\n    owner: RepositoryOwner = None\n    parent: Repository = None\n    primaryLanguage: Language = None\n    projectsResourcePath: URI = None\n    projectsUrl: URI = None\n    pushedAt: DateTime = None\n    resourcePath: URI = None\n    sshUrl: GitSSHRemote = None\n    updatedAt: DateTime = None\n    url: URI = None\n    viewerCanAdminister: bool = None\n    viewerCanCreateProjects: bool = None\n    viewerCanSubscribe: bool = None\n    viewerCanUpdateTopics: bool = None\n    viewerHasStarred: bool = None\n    viewerPermission: RepositoryPermission = None\n    viewerSubscription: SubscriptionState = None\n\n    def assignableUsers(self, first:int, after:str, last:int, before:str) -\u003e UserConnection:\n        \"\"\"\n        A list of users that can be assigned to issues in this repository.\n        \"\"\"\n        tmpl = \"assignableUsers(first:%(first)s, after:%(after)s, last:%(last)s, before:%(before)s) %(ret)s\"\n        return self.wrap(tmpl, fn=True, first=first, after=after, last=last, before=before, ret=UserConnection.F())\n...\nclass Query(Node):\n    ....\n    def repository(self, owner:str, name:str) -\u003e Repository:\n        \"\"\"\n        Lookup a given repository by the owner and repository name.\n        \"\"\"\n        tmpl = \"repository(owner:%(owner)s, name:%(name)s) %(ret)s\"\n        return self.wrap(tmpl, fn=True, owner=owner, name=name, ret=Repository.F())\n\n\n```\n\n### Sample of request\n\n```python\nfrom grph.http import guery\n\nimport examples.github_lib as gh\n\n\ndef endpoint(q):\n    return guery(q, port=443, sufix=\"/beta/betausers\")\n\n\ndef test_gh():\n    q = gh.query.repository(owner=\"foo\", repo=\"bar\")\n    print(endpoint(q))\n\n    q = gh.query.user(name=\"bar\")\n    print(endpoint(q))\n\ntest_gh()\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmsoedov%2Fgrph","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmsoedov%2Fgrph","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmsoedov%2Fgrph/lists"}