{"id":15523368,"url":"https://github.com/xsleonard/pystmark","last_synced_at":"2025-08-25T10:19:08.480Z","repository":{"id":6483837,"uuid":"7724107","full_name":"xsleonard/pystmark","owner":"xsleonard","description":"Postmark library for python 2 and 3. Built on top of the requests library.","archived":false,"fork":false,"pushed_at":"2023-06-15T16:57:25.000Z","size":748,"stargazers_count":24,"open_issues_count":4,"forks_count":15,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-07-01T05:41:50.929Z","etag":null,"topics":["email","postmark","postmarkapp","python"],"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/xsleonard.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":"AUTHORS.md","dei":null,"publiccode":null,"codemeta":null}},"created_at":"2013-01-21T00:45:15.000Z","updated_at":"2023-06-17T19:59:51.000Z","dependencies_parsed_at":"2024-06-19T19:14:51.017Z","dependency_job_id":null,"html_url":"https://github.com/xsleonard/pystmark","commit_stats":{"total_commits":123,"total_committers":12,"mean_commits":10.25,"dds":0.4796747967479674,"last_synced_commit":"489df6a23868a7a18f4ebe95a5281b0f82889e05"},"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"purl":"pkg:github/xsleonard/pystmark","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xsleonard%2Fpystmark","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xsleonard%2Fpystmark/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xsleonard%2Fpystmark/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xsleonard%2Fpystmark/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/xsleonard","download_url":"https://codeload.github.com/xsleonard/pystmark/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xsleonard%2Fpystmark/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":272045418,"owners_count":24864021,"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-08-25T02:00:12.092Z","response_time":1107,"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":["email","postmark","postmarkapp","python"],"created_at":"2024-10-02T10:45:00.214Z","updated_at":"2025-08-25T10:19:08.437Z","avatar_url":"https://github.com/xsleonard.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# pystmark\n\n[![PyPI version](https://badge.fury.io/py/pystmark.png)](http://badge.fury.io/py/pystmark)\n[![Build Status](https://travis-ci.org/xsleonard/pystmark.png)](https://travis-ci.org/xsleonard/pystmark)\n[![Coverage Status](https://coveralls.io/repos/xsleonard/pystmark/badge.png)](https://coveralls.io/r/xsleonard/pystmark)\n\n\n[Postmark API](http://developer.postmarkapp.com/) library for python 2.7, 3.6 and pypy.\nBuilt on top of the [requests](http://docs.python-requests.org/en/latest/) library.\n\n## Web Framework Integration\n\n* [Flask-Pystmark](https://github.com/xsleonard/flask-pystmark)\n\n## Documentation\n\nThe full Sphinx-compiled documentation is available here: [https://readthedocs.org/docs/pystmark/en/latest/](https://readthedocs.org/docs/pystmark/en/latest/)\n\n## Example Usage\n\n```python\nfrom pystmark import (\n    Message,\n    send,\n    send_with_template,\n    send_batch,\n    send_batch_with_templates,\n    UnauthorizedError\n)\n\nAPI_KEY = 'my_api_key'\nSENDER = 'me@example.com'\n\n# Send a single message\nmessage = Message(\n    sender=SENDER,\n    to='you@example.com',\n    subject='Hi',\n    text='A message',\n    tag='greeting'\n)\n\nresponse = send(message, api_key=API_KEY)\n\n# Send a template message\nmodel = {\n    'user_name': 'John Smith',\n    'company': {\n      'name': 'ACME'\n    }\n\nmessage = Message(\n    sender=SENDER,\n    to='you@example.com',\n    template_id=11111,\n    template_model=model,\n    tag='welcome',\n)\n\nresponse = send_with_template(message, api_key=API_KEY)\n\n# Send multiple messages\nmessages = [\n    Message(\n        sender=SENDER,\n        to='you@example.com',\n        subject='Hi',\n        text='A message',\n        tag='greeting',\n        message_stream='broadcasts',\n    )\n]\n\nresponse = send_batch(messages, api_key=API_KEY)\n\n# Send multiple messages with templates\nmessages = [\n    Message(\n        sender=SENDER,\n        to='you@example.com',\n        template_id=11111,\n        template_model=model,\n        tag='greeting',\n        message_stream='broadcasts',\n    )\n]\n\nresponse = send_batch_with_templates(messages, api_key=API_KEY)\n\n# Check API response error\ntry:\n    response.raise_for_status()\nexcept UnauthorizedError:\n    print 'Use your real API key'\n\n# Check for errors in each message when sending batch emails:\nfor m in response.messages:\n    if m.error_code \u003e 0:\n        print m.message\n```\n\n## Contribution\n\n1. Fork this repo\n2. Make your changes and write a test for them\n3. Add yourself to the [AUTHORS.md](./AUTHORS.md) file and submit a pull request\n\nPlease run the tests with `./setup.py test --with-integration`, with at least python2.7,\nbefore you make a pull request. Requirements for running the tests are in `tests/requirements.txt`.\nThe other versions will be handled by [travis-ci](https://travis-ci.org/).\n\nThe pep8 tests may fail if using pypy due to [this bug](https://bugs.pypy.org/issue1207),\nso that test is disabled if pypy is detected.\n\n## Copyright and License\n\npystmark is licensed under the MIT license. See the [LICENSE](./LICENSE) file for full details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxsleonard%2Fpystmark","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxsleonard%2Fpystmark","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxsleonard%2Fpystmark/lists"}