{"id":16195122,"url":"https://github.com/ashcrow/micro-client","last_synced_at":"2025-07-28T11:07:12.614Z","repository":{"id":69247036,"uuid":"115768076","full_name":"ashcrow/micro-client","owner":"ashcrow","description":"go-micro grpc resolver/client in python","archived":false,"fork":false,"pushed_at":"2018-06-10T16:43:24.000Z","size":4,"stargazers_count":3,"open_issues_count":1,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-07T15:55:16.437Z","etag":null,"topics":["client","micro","micro-library","python","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/ashcrow.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-12-30T02:23:51.000Z","updated_at":"2020-02-15T02:12:55.000Z","dependencies_parsed_at":"2023-03-17T02:46:21.459Z","dependency_job_id":null,"html_url":"https://github.com/ashcrow/micro-client","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ashcrow/micro-client","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ashcrow%2Fmicro-client","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ashcrow%2Fmicro-client/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ashcrow%2Fmicro-client/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ashcrow%2Fmicro-client/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ashcrow","download_url":"https://codeload.github.com/ashcrow/micro-client/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ashcrow%2Fmicro-client/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267505099,"owners_count":24098346,"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","status":"online","status_checked_at":"2025-07-28T02:00:09.689Z","response_time":68,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["client","micro","micro-library","python","python3"],"created_at":"2024-10-10T08:26:20.022Z","updated_at":"2025-07-28T11:07:12.587Z","avatar_url":"https://github.com/ashcrow.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# mico-client\nPython 3 resolver for [go-micro](https://github.com/micro/go-micro) grpc\nservices.\n\n[![Build Status](https://travis-ci.org/ashcrow/micro-client.svg?branch=master)](https://travis-ci.org/ashcrow/micro-client)\n\n\n## Examples\n\n### Compiling\nMake sure you have [the needed protobuf and plugins](https://github.com/micro/go-micro#install-protobuf).\n\n**Notes**:\n* You will need to set or replace the variables!\n* Make sure you have the python package *grpcio-tools* installed!\n\n\n```shell\n    PATH=$PATH:$GOBIN_PATH protoc -I=$SOURCE_OF_MICRO_PROJECT --proto_path=$GOPATH/src:. --python_out=plugins=micro,grpc:. $PATH_TO_PROTO_FILE\n    python -m grpc_tools.protoc -I=$SOURCE_OF_MICRO_PROJECT --python_out=. --grpc_python_out=. $PATH_TO_PROTO_FILE\n```\n\n### Etcd\n```python\n    from micro_client.registry.etcdregistry import etcd, Registry\n    from micro_client.common import Services\n\n    s = Services(Registry(etcd.Client(port=2379), '/micro-registry'))\n```\n\n\n### Consul\n```python\n    import requests\n\n    from micro_client.registry.consulregistry import Registry\n    from micro_client.common import Services\n\n    s = Services('http://127.0.0.1:8500/v1', session=requests.Session()))\n```\n\n\n### Use it!\n```python\n    service = s.resolve('some')\n    print(service.connection_info)\n\n    # Import the stub and grpc structures for use\n    import grpc\n    from some_pb2_grpc import SomeStub\n    from some_pb2 import Input, Structures\n    \n    # Get the stub\n    stub = services.insecure('some', SomeStub)\n    # Call it\n    result = stub.SomeCall(Input(Data=1), Structures(Some=\"data\", ID=1))\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fashcrow%2Fmicro-client","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fashcrow%2Fmicro-client","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fashcrow%2Fmicro-client/lists"}