{"id":31589408,"url":"https://github.com/seveightech/nunyakata","last_synced_at":"2026-01-20T16:57:39.421Z","repository":{"id":306660208,"uuid":"1024403327","full_name":"SeveighTech/nunyakata","owner":"SeveighTech","description":"Núnyá kátã (\"All Knowledge\" in Ewe) is A unified Python library wrapping Ghanaian digital services like payments, identity verification, SMS, USSD, and more. Built to simplify integrations with providers such as appsNmobile, Nalo, and others, all in one place.","archived":false,"fork":false,"pushed_at":"2025-08-05T03:15:05.000Z","size":210,"stargazers_count":0,"open_issues_count":78,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-09-13T02:36:05.422Z","etag":null,"topics":["african-fintech","api-integration","api-wrapper","developer-tools","fintech","ghana","ghana-apis","mobile-money","nalo-solutions","payments","python","python-library","rest-api","sms","sms-api","ussd-api"],"latest_commit_sha":null,"homepage":"https://nunyakata.readthedocs.io/","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/SeveighTech.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,"zenodo":null}},"created_at":"2025-07-22T16:36:18.000Z","updated_at":"2025-07-27T11:18:26.000Z","dependencies_parsed_at":"2025-07-27T00:03:53.664Z","dependency_job_id":"8b8dc09f-5ea0-4b9d-babd-66164deabb8d","html_url":"https://github.com/SeveighTech/nunyakata","commit_stats":null,"previous_names":["seveightech/nunyakata"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/SeveighTech/nunyakata","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SeveighTech%2Fnunyakata","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SeveighTech%2Fnunyakata/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SeveighTech%2Fnunyakata/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SeveighTech%2Fnunyakata/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SeveighTech","download_url":"https://codeload.github.com/SeveighTech/nunyakata/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SeveighTech%2Fnunyakata/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278551493,"owners_count":26005388,"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-10-06T02:00:05.630Z","response_time":65,"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":["african-fintech","api-integration","api-wrapper","developer-tools","fintech","ghana","ghana-apis","mobile-money","nalo-solutions","payments","python","python-library","rest-api","sms","sms-api","ussd-api"],"created_at":"2025-10-06T02:52:37.061Z","updated_at":"2025-10-06T02:52:38.044Z","avatar_url":"https://github.com/SeveighTech.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# nunyakata\n\nNúnyá kátã (All Knowledge in Ewe) is A unified Python library wrapping Ghanaian digital services like payments, identity verification, SMS, USSD, and more. Built to simplify integrations with providers such as appsNmobile, Nalo, and others, all in one place.\n\n## Features\n\n- **Nalo Solutions Integration**: Complete payment and SMS API support\n- **Environment-based Configuration**: Easy credential management with `.env` files\n- **Type Safety**: Full type hints and Pydantic validation\n- **Comprehensive Error Handling**: Detailed error codes and explanations\n- **Multiple Authentication Methods**: Support for various credential types\n- **Production Ready**: Built for scalability and reliability\n\n## Installation\n\n```bash\npip install nunyakata\n```\n\nFor environment variable support:\n\n```bash\npip install nunyakata[env]\n```\n\n## Quick Start\n\n### Method 1: Environment Variables (Recommended)\n\n1. Copy the environment template:\n\n```bash\ncp .env.example .env\n```\n\n2. Fill in your credentials in `.env`:\n\n```env\n# SMS API (choose one method)\nNALO_SMS_AUTH_KEY=your_auth_key_here\nNALO_SMS_SOURCE=YOUR_SENDER_ID\n\n# Payment API\nNALO_PAYMENT_USERNAME=your_username\nNALO_PAYMENT_PASSWORD=your_password\nNALO_MERCHANT_ID=your_merchant_id\n```\n\n3. Use the client:\n\n```python\nfrom nunyakata import NaloSolutions, create_nalo_client\n\n# Method 1: Using configuration dictionary\nconfig = {\n    \"sms\": {\n        \"username\": \"your_username\",\n        \"password\": \"your_password\",\n        \"sender_id\": \"YOUR_SENDER_ID\"\n    },\n    \"payment\": {\n        \"merchant_id\": \"your_merchant_id\",\n        \"username\": \"your_username\",\n        \"password\": \"your_password\"\n    },\n    \"email\": {\n        \"username\": \"your_username\",\n        \"password\": \"your_password\",\n        \"from_email\": \"sender@example.com\"\n    }\n}\n\nclient = NaloSolutions(config)\n\n# Send SMS\nresponse = client.send_sms(\"233501234567\", \"Hello Ghana!\")\n\n# Make payment\npayment_response = client.make_payment(\n    amount=10.00,\n    customer_number=\"233501234567\",\n    customer_name=\"John Doe\",\n    item_desc=\"Product purchase\",\n    order_id=\"ORDER_123\",\n    payby=\"MTN\",\n    callback_url=\"https://yoursite.com/callback\"\n)\n\n# Send email\nemail_response = client.send_email(\n    to_email=\"recipient@example.com\",\n    subject=\"Test Email\",\n    message=\"Hello from Ghana!\"\n)\n\n# Handle USSD requests (for webhook endpoints)\nussd_response = client.handle_ussd_request({\n    \"USERID\": \"test_user\",\n    \"MSISDN\": \"233501234567\",\n    \"USERDATA\": \"\",\n    \"MSGTYPE\": True,\n    \"SESSIONID\": \"session_123\"\n})\n```\n\n### Method 2: Direct Initialization\n\n```python\nfrom nunyakata import NaloSolutions\n\nclient = NaloSolutions(\n    # SMS credentials\n    sms_username=\"your_username\",\n    sms_password=\"your_password\",\n    sms_sender_id=\"YOUR_SENDER_ID\",\n\n    # Payment credentials\n    payment_username=\"your_username\",\n    payment_password=\"your_password\",\n    payment_merchant_id=\"your_merchant_id\",\n\n    # Email credentials\n    email_username=\"your_email_username\",\n    email_password=\"your_email_password\",\n    email_from_email=\"sender@example.com\"\n)\n)\n```\n\n## Supported Services\n\n### Nalo Solutions\n\n#### SMS Services\n\n- ✅ Text SMS (GET/POST methods)\n- ✅ Flash SMS\n- ✅ Bulk SMS (individual and batch)\n- ✅ Delivery reports and callbacks\n- ✅ Username/password and auth key authentication\n- ✅ Complete error code handling\n\n#### Payment Services\n\n- ✅ Mobile Money payments (MTN, Vodafone, AirtelTigo)\n- ✅ Vodafone voucher and USSD payments\n- ✅ Payment callbacks and webhooks\n- ✅ Secure secret generation\n\n#### USSD Services\n\n- ✅ USSD request handling framework\n- ✅ Session management utilities\n- ✅ Menu creation and response formatting\n- ✅ Flask webhook integration\n\n#### Email Services\n\n- ✅ JSON-based email sending\n- ✅ Email with file attachments\n- ✅ Bulk email support\n- ✅ HTML email capabilities\n- ✅ Template support with placeholders\n- ✅ Username/password and auth key authentication\n- ✅ Delivery status callbacks\n\n## Examples\n\nSee the `examples/` directory for comprehensive usage examples:\n\n- `examples/nalo_solutions_demo.py` - Basic usage examples\n- `examples/environment_config_demo.py` - Environment configuration\n- `examples/sms_comprehensive_demo.py` - All SMS features\n- `examples/email_comprehensive_demo.py` - All email features\n- `examples/ussd_comprehensive_demo.py` - USSD application with Flask\n- `examples/nalo_webhook_example.py` - Webhook handling\n\n## Documentation\n\nDetailed API documentation available in the `docs/` directory:\n\n- `docs/nalo_solutions.md` - Nalo Solutions API guide\n- `docs/nalo_api_compliance.md` - API compliance details\n- `docs/sms_api_compliance.md` - SMS API implementation details\n- `docs/ussd_api_compliance.md` - USSD API implementation details\n- `docs/email_api_compliance.md` - Email API implementation details\n- `docs/setup_guide.md` - Complete setup guide\n\n## Configuration\n\n### Environment Variables\n\nSee `.env.example` for all available configuration options:\n\n```env\n# SMS Configuration\nNALO_SMS_USERNAME=your_sms_username\nNALO_SMS_PASSWORD=your_sms_password\nNALO_SMS_SENDER_ID=YOUR_SENDER_ID\n\n# Payment Configuration\nNALO_PAYMENT_USERNAME=your_payment_username\nNALO_PAYMENT_PASSWORD=your_payment_password\nNALO_PAYMENT_MERCHANT_ID=your_merchant_id\n\n# Email Configuration\nNALO_EMAIL_USERNAME=your_email_username\nNALO_EMAIL_PASSWORD=your_email_password\nNALO_EMAIL_FROM_EMAIL=sender@example.com\nNALO_EMAIL_FROM_NAME=Your Name\n\n# USSD Configuration\nNALO_USSD_USERID=your_ussd_userid\nNALO_USSD_MSISDN=233501234567\n\n# Optional Callbacks\nPAYMENT_CALLBACK_URL=https://yoursite.com/webhooks/payment\nSMS_DELIVERY_CALLBACK_URL=https://yoursite.com/webhooks/sms\nEMAIL_CALLBACK_URL=https://yoursite.com/webhooks/email\n```\n\n### Configuration Validation\n\n```python\nfrom nunyakata import NaloSolutions\n\n# Initialize client with configuration\nconfig = {\n    \"sms\": {\"username\": \"test\", \"password\": \"test\"},\n    \"payment\": {\"merchant_id\": \"123\", \"username\": \"test\", \"password\": \"test\"}\n}\n\nclient = NaloSolutions(config)\nprint(\"Client initialized successfully!\")\n```\n\n## Development\n\n### Setup\n\n```bash\ngit clone https://github.com/SeveighTech/nunyakata.git\ncd nunyakata\npip install -e \".[dev]\"\n```\n\n### Testing\n\n```bash\npytest\npytest --cov=nunyakata tests/\n```\n\n### Code Quality\n\n```bash\nblack src/ tests/\nisort src/ tests/\nflake8 src/ tests/\nmypy src/\n```\n\n## Contributing\n\n1. Fork the repository\n2. Create a feature branch\n3. Make your changes\n4. Add tests\n5. Submit a pull request\n\n## Development\n\n### Setting up Development Environment\n\n```bash\n# Clone the repository\ngit clone https://github.com/SeveighTech/nunyakata.git\ncd nunyakata\n\n# Install in development mode\npip install -e \".[dev,test]\"\n\n# Run tests\npytest\n\n# Run with coverage\npytest --cov=src/nunyakata --cov-report=html\n```\n\n### Publishing to PyPI\n\nThis project uses automated publishing through GitHub Actions. To release:\n\n1. **Prepare the release:**\n\n   ```bash\n   python release.py 0.1.0  # Replace with your version\n   ```\n\n2. **Commit and tag:**\n\n   ```bash\n   git add .\n   git commit -m \"Release v0.1.0\"\n   git tag v0.1.0\n   git push origin main --tags\n   ```\n\n3. **Create GitHub Release:**\n\n   - Go to GitHub Releases\n   - Create a new release with the tag\n   - The GitHub Action will automatically publish to PyPI\n\n4. **Manual publishing (if needed):**\n\n   ```bash\n   # Test PyPI first\n   python release.py test\n\n   # Then PyPI\n   python release.py publish\n   ```\n\n### Test Coverage\n\nOur comprehensive test suite includes:\n\n- ✅ **56 tests** with **100% pass rate**\n- ✅ **66% code coverage** on core functionality\n- ✅ All four Nalo APIs (Payments, SMS, USSD, Email)\n- ✅ Error handling and edge cases\n- ✅ Network resilience testing\n- ✅ Multiple authentication methods\n- ✅ Input validation\n\n## License\n\nMIT License - see LICENSE file for details.\n\n## Support\n\n- **Documentation**: See `docs/` directory\n- **Examples**: See `examples/` directory\n- **Issues**: GitHub Issues\n- **Email**: nunyakata@seveightech.com\n\n## Roadmap\n\n- [ ] Additional payment providers\n- [ ] Identity verification services\n- [ ] Banking API integrations\n- [ ] Government service APIs\n- [ ] Utility payment services\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fseveightech%2Fnunyakata","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fseveightech%2Fnunyakata","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fseveightech%2Fnunyakata/lists"}