{"id":26048583,"url":"https://github.com/jackkweyunga/unique-codes-generator","last_synced_at":"2025-04-10T16:20:34.177Z","repository":{"id":239348814,"uuid":"798210368","full_name":"jackkweyunga/unique-codes-generator","owner":"jackkweyunga","description":"grpc service for generating universally unique ids / codes ","archived":false,"fork":false,"pushed_at":"2024-05-11T17:25:32.000Z","size":30,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-24T14:08:27.795Z","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/jackkweyunga.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":"2024-05-09T10:12:06.000Z","updated_at":"2024-05-14T07:43:01.000Z","dependencies_parsed_at":"2024-05-11T18:45:34.593Z","dependency_job_id":null,"html_url":"https://github.com/jackkweyunga/unique-codes-generator","commit_stats":null,"previous_names":["jackkweyunga/unique-codes-generator"],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jackkweyunga%2Funique-codes-generator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jackkweyunga%2Funique-codes-generator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jackkweyunga%2Funique-codes-generator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jackkweyunga%2Funique-codes-generator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jackkweyunga","download_url":"https://codeload.github.com/jackkweyunga/unique-codes-generator/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247953106,"owners_count":21023947,"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":"2025-03-08T00:26:55.611Z","updated_at":"2025-04-10T16:20:34.157Z","avatar_url":"https://github.com/jackkweyunga.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n\u003ch2 align=\"center\"\u003e\n    GRPC SERVER FOR UNIQUE CODE(S) GENERATION\n\u003c/h2\u003e\n\n## Usage using ssl\n- Python client\n```shell\npip install ucg-client\n```\n\n- Add the following to your `example.py`\n```python\nimport grpc\nfrom ucg_client import generator_pb2, generator_pb2_grpc\n\n# replace address with a domain address with https\n# e.g ucg.example.com\n# do not use path like example.com/ucg\nchannel = grpc.secure_channel('ADDRESS', grpc.ssl_channel_credentials())\nstub = generator_pb2_grpc.GeneratorStub(channel)\n\n# generate code\ncode = stub.GenerateUniqueCode(\n    generator_pb2.GenerateUniqueCodeRequest()\n)\nprint(code)\n\n# generates codes\ncodes = stub.GenerateUniqueCodes(\n    generator_pb2.GenerateUniqueCodesRequest(\n        count=100\n    )\n)\nprint(codes)\n\n```\n\n\n## Development\n\nserver at: server/server.go\n\nRun server:\n```shell\ncd scripts \u0026\u0026 go run server.go\n```\n\npython client at: clients/python/src/ucg_client\n- Install the python client.\nBuild wheel\n```shell\ncd clients/python \u0026\u0026 sh build.sh\n```\n\nInstall wheel\n```shell\npip install \"\u003cpath to wheel\u003e\"\n```\n\n```python \nimport grpc\nfrom ucg_client import generator_pb2, generator_pb2_grpc\n\nchannel = grpc.insecure_channel('localhost:5000')\nstub = generator_pb2_grpc.GeneratorStub(channel)\n\n# generate code\ncode = stub.GenerateUniqueCode(\n    generator_pb2.GenerateUniqueCodeRequest()\n)\nprint(code)\n\n# generates codes\ncodes = stub.GenerateUniqueCodes(\n    generator_pb2.GenerateUniqueCodesRequest(\n        count=100\n    )\n)\nprint(codes)\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjackkweyunga%2Funique-codes-generator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjackkweyunga%2Funique-codes-generator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjackkweyunga%2Funique-codes-generator/lists"}