{"id":18576884,"url":"https://github.com/greensms-io/greensms-python","last_synced_at":"2025-12-13T15:29:54.630Z","repository":{"id":56221949,"uuid":"308434719","full_name":"greensms-io/greensms-python","owner":"greensms-io","description":"Python GREENSMS API client: SMS, Call, Voice, VK, WhatsApp, Viber","archived":false,"fork":false,"pushed_at":"2023-03-24T21:28:05.000Z","size":135,"stargazers_count":6,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-10-21T13:49:02.208Z","etag":null,"topics":["2fa-codes","call-for-code","sms","sms-api","sms-notifications","sms-verification","viber-api","vk","whatsapp"],"latest_commit_sha":null,"homepage":"https://api.greensms.ru","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/greensms-io.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":"2020-10-29T19:52:16.000Z","updated_at":"2023-12-15T16:46:05.000Z","dependencies_parsed_at":"2024-07-22T20:08:20.712Z","dependency_job_id":null,"html_url":"https://github.com/greensms-io/greensms-python","commit_stats":null,"previous_names":["greensms-ru/greensms-python"],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/greensms-io/greensms-python","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/greensms-io%2Fgreensms-python","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/greensms-io%2Fgreensms-python/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/greensms-io%2Fgreensms-python/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/greensms-io%2Fgreensms-python/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/greensms-io","download_url":"https://codeload.github.com/greensms-io/greensms-python/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/greensms-io%2Fgreensms-python/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":27708035,"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-12-13T02:00:09.769Z","response_time":147,"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":["2fa-codes","call-for-code","sms","sms-api","sms-notifications","sms-verification","viber-api","vk","whatsapp"],"created_at":"2024-11-06T23:27:00.085Z","updated_at":"2025-12-13T15:29:54.593Z","avatar_url":"https://github.com/greensms-io.png","language":"Python","readme":"# greensms-python\n\n![GitHub release (latest by date)](https://img.shields.io/github/v/release/greensms-ru/greensms-python)\n![PyPI - Python Version](https://img.shields.io/pypi/pyversions/greensms)\n![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/greensms-ru/greensms-python/python-package.yml?branch=main)\n![Coveralls github](https://img.shields.io/coveralls/github/greensms-ru/greensms-python)\n\n## Documentation\n\nThe documentation for the GREENSMS API can be found [here][apidocs].\n\n## Installation\n\n```bash\npipenv install greensms\n```\n\nor\n\n```bash\npip install greensms\n```\n\n## Sample Usage\n\nCheck out these [code examples](examples) to get up and running quickly.\n\n```python\n\nfrom greensms.client import GreenSMS\n\n# Register at my.greensms.ru first\nclient = GreenSMS(user='test', password='test')\n\nresponse = client.sms.send(to='71231234567', txt='Message to deliver')\nprint(response.request_id) # or print(response['request_id'])\n\n```\n\n### Environment Variables\n\n`greensms-python` supports credential storage in environment variables. If no credentials are provided following env vars will be used: `GREENSMS_USER`/`GREENSMS_PASS` OR `GREENSMS_TOKEN`.\n\n### Token Auth\n\n```python\n\nfrom greensms.client import GreenSMS\n\n# Register at my.greensms.ru first\nclient = GreenSMS(token='yourtoken')\n\nresponse = client.account.balance()\nprint(response.balance)\n\n```\n\n## Compatibility\n\n`greensms-python` is compatible with Python 2.7 and Python 3.4 onwards until the latest Python 3.11 version\n\n## Methods\n\n- You can either use username/password combination or auth token to create an object with constructor\n- All methods support named \\*\\*kwargs\n- Each API Function is available as `MODULE.FUNCTION()`\n- Parameters for each API can be referred from [here][apidocs]\n- Response keys can be used as dictionary keys `response['key']` or properties `response.key`\n- Response keys by default are available in `snake_case`. If you want to use `camelCase`, then pass `use_camel_case=true`, in the constructor\n\n## Handling Exceptions\n\n- Exceptions for all APIs are thrown with `RestError` class. It extends the default Python Exception class.\n- Each error, will have `error`, `code`, `message`, `errorType` fields.\n- In case of _Validation Error_, additional params are available to show field-wise rule failures. Can be accessed by `e.params` property on the error object\n\n## Getting help\n\nIf you need help installing or using the library, please contact us: [support@greensms.ru](mailto:support@greensms.ru).\n\nIf you've instead found a bug in the library or would like new features added, go ahead and open issues or pull requests against this repo!\n\n## Contributing\n\nBug fixes, docs, and library improvements are always welcome. Please refer to our [Contributing Guide](CONTRIBUTING.md) for detailed information on how you can contribute.\nIf you're not familiar with the GitHub pull request/contribution process, [this is a nice tutorial](https://gun.io/blog/how-to-github-fork-branch-and-pull-request/).\n\n### Getting Started\n\nIf you want to familiarize yourself with the project, you can start by [forking the repository](https://help.github.com/articles/fork-a-repo/) and [cloning it in your local development environment](https://help.github.com/articles/cloning-a-repository/). The project requires [Node.js](https://nodejs.org) to be installed on your machine.\n\nAfter cloning the repository, install the dependencies by running the following command in the directory of your cloned repository:\n\n```bash\npip install -r requirements.txt\n```\n\nIn addition to this, we recommend running the setup with [virtualenv](https://virtualenv.pypa.io/), for creating an isolated Python development environment.\n\nGreenSMS has all the unit tests defined under **tests** folder with `_test.py` extension. Although it uses Python Unittest, we recommended that you test with [py.test](http://pytest.org/). PyTest supports Python unit tests out of the box and is faster for running the tests in bulk.\n\n```bash\npytest tests\n```\n\nWe also support [tox](https://tox.readthedocs.io/) for automate env/interpretor wise testing. Support versions are added to tox.ini. Dependencies added in root requirements.txt are supposed to be added to `tests/requirements.txt` as well.\n\nYou can install and run tox for the project with the following commands.\n\n```bash\npip install tox  # Install tox\n\ntox # Run test\n\n```\n\n[apidocs]: https://api.greensms.ru/\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgreensms-io%2Fgreensms-python","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgreensms-io%2Fgreensms-python","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgreensms-io%2Fgreensms-python/lists"}