{"id":36898759,"url":"https://github.com/clovisphere/mpesa-btobet-client","last_synced_at":"2026-01-12T15:44:23.052Z","repository":{"id":225772426,"uuid":"722137644","full_name":"clovisphere/mpesa-btobet-client","owner":"clovisphere","description":"A wrapper that sits between safaricom (mpesa) and btobet","archived":false,"fork":false,"pushed_at":"2025-03-22T08:30:38.000Z","size":156,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-22T09:25:48.303Z","etag":null,"topics":["api","docker","fastapi","nginx","python","wiremock"],"latest_commit_sha":null,"homepage":"","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/clovisphere.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":"2023-11-22T14:11:57.000Z","updated_at":"2025-03-22T08:30:35.000Z","dependencies_parsed_at":"2025-03-22T09:22:22.111Z","dependency_job_id":"4c556620-62dc-4fc4-a67e-6c7f8ce332a8","html_url":"https://github.com/clovisphere/mpesa-btobet-client","commit_stats":null,"previous_names":["clovisphere/mpesa-btobet-client"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/clovisphere/mpesa-btobet-client","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/clovisphere%2Fmpesa-btobet-client","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/clovisphere%2Fmpesa-btobet-client/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/clovisphere%2Fmpesa-btobet-client/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/clovisphere%2Fmpesa-btobet-client/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/clovisphere","download_url":"https://codeload.github.com/clovisphere/mpesa-btobet-client/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/clovisphere%2Fmpesa-btobet-client/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28341636,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-12T12:22:26.515Z","status":"ssl_error","status_checked_at":"2026-01-12T12:22:10.856Z","response_time":98,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["api","docker","fastapi","nginx","python","wiremock"],"created_at":"2026-01-12T15:44:22.351Z","updated_at":"2026-01-12T15:44:23.043Z","avatar_url":"https://github.com/clovisphere.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# MPESA-BTOBET-CLIENT\n\nA simple wrapper (API) that sits between [MPESA](https://www.safaricom.co.ke/personal/m-pesa) and [BtoBet](https://www.btobet.com/), allowing 3rd party clients to seamlessly process payments (B2B, B2C and C2B).\n\n\nTODO:\n\n- [ ] C2B (partially, the **Broker** has been implemented)\n- [ ] Unit Tests\n- [ ] CI/CD (Github Actions or/and GitLab CI)\n\n## Usage\n\nPrerequisite:\n\n- [git](https://git-scm.com/)\n- [Python 3.12](https://www.python.org/downloads/release/python-3120/) or later.\n- [Poetry](https://python-poetry.org/)\n- [Docker](https://www.docker.com/)\n\n### Development\n\nWithout [Docker](https://www.docker.com/):\n\n```bash\ngit clone git@github.com:clovisphere/mpesa-btobet-client.git\ncd mpesa-btobet-client\npoetry install\nexport PYTHONDONTWRITEBYTECODE=1  # you don't have to do this:-)\nexport DATABASE_URL=sqlite:///./demo.db\n```\n\nIf you are using the [zed](https://zed.dev/) code editor, please add the below to [./pyproject.toml](pyproject.toml):\n\n```toml\n[tool.pyright]\nvenvPath = \"\"  # absolute path to your `virtualenvs` folder\nvenv = \"\"      # venv name\n```\n\nSetup the database (fresh start, with no revision):\n\n```bash\nalembic current                            # check db state\nalembic revision --autogenerate -m \"init\"  # initialize database\nalembic upgrade head                       # apply migration(s)\n```\n\nUse the below if revision(s) exist in [versions](./alembic/versions):\n\n```bash\nalembic current                  # check db state\nalembic upgrade head             # apply migration(s)\n```\n\nTo learn more about alembic [here](https://alembic.sqlalchemy.org/en/latest/).\n\n#### SQLite3 (for dummies 😂)\n\n```console\n$ sqlite3 demo.db                   # access sqlite console from your terminal\n\nsqlite\u003e .headers ON\nsqlite\u003e .mode columns\nsqlite\u003e .tables                     # show all tables\nsqlite\u003e .schema deposit             # equivalent to MySQL's `DESC deposit;`\nsqlite\u003e pragma table_info(deposit); # same as ☝🏽\nsqlite\u003e select * from deposit;      # view (all) table data\nsqlite\u003e .exit                       # exit the sqlite3 console\n```\n\nWe will use a [Makefile](./Makefile) to start the app 🤗\n\n```bash\nmake local-dev\n```\n\nWith [Docker](https://www.docker.com/):\n\n\n```bash\nmake build-start-container-dev\n```\n\nTest it out:\n\n1. [/health](http://localhost:8088/health)\n2. [swagger ui](http://localhost:8088/docs)\n\nwith [httpie](https://httpie.io/):\n\n```http :8088/health```\n\nyou'd get:\n\n```json\n{\n    \"status\": \"healthy 😊\"\n}\n```\n\nTo bring down the containers and volumes down once done:\n\n```bash\nmake stop-container\n```\n\nYou can read and learn about Makefiles [here](https://opensource.com/article/18/8/what-how-makefile).\n\n### Production\n\n```bash\nmake build-start-container-prod DATABASE_URL=url_to_your_prod_db\n```\n\n## Author\n\nClovis Mugaruka\n\n- [github.com/clovisphere](https://github.com/clovisphere)\n- [twitter/clovisphere](https://twitter.com/clovisphere)\n\n### License\n\nCopyright ©️ 2023, [Clovis Mugaruka](https://clovisphere.com).\\\nReleased under the [MIT License](./LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fclovisphere%2Fmpesa-btobet-client","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fclovisphere%2Fmpesa-btobet-client","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fclovisphere%2Fmpesa-btobet-client/lists"}