rnevarezc / pyostal Goto Github PK
View Code? Open in Web Editor NEWA lightweight Postal API Client for Python
License: MIT License
A lightweight Postal API Client for Python
License: MIT License
When running following the example provided in the README, I seem to get stuck on the following error:
sys:1: RuntimeWarning: coroutine 'Client.send' was never awaited
As far as I can tell this is because the Client.send
function is async, but there is no mention of needing asyncio anywhere in the README. Am I missing something obvious?
Many thanks.
Code example that I ran in Python 3.10.9 (domains and API key changed for privacy, but otherwise unchanged):
from pyostal.client import Client
# Create a new Postal client using the server key of your Postal Installation.
client = Client('https://postal.example.com', 'myPostalAPIKeyGoesHere')
# Create a dict with the message:
payload = {
'to': ['[email protected]'],
'from_address': '[email protected]',
'reply_to': '[email protected]',
'subject': 'This is a subject',
'plain_body': 'This is a body'
}
#send it using the client. that's it
response = client.send(payload)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.