clicksend / clicksend-python Goto Github PK
View Code? Open in Web Editor NEWClickSend Python SDK
ClickSend Python SDK
Hi,
would it be possible to set originator when using voice call api ?
it is difficult to recognize the calling phone number.
Thx
I am having trouble getting my Pico W to send a text message. it is easy to connect to WIFI, and my code works without errors, but get a 401 error. A asked BARD and the ClickSend helper what SMS_API_ENDPOINT to use and I have 4, but none work. Can someone share micro python Thonny script that will send a simple text )'from Bobs W' to my phone? I have the Toll Free Number in my ClickSend account.
The test directory https://github.com/ClickSend/clicksend-python/tree/master/test does contains a number of automatically generated tests (by clicksend-codegen it seems). However, none of the tests actually do anything. For example:
class TestAccount(unittest.TestCase):
"""Account unit test stubs"""
def setUp(self):
pass
def tearDown(self):
pass
def testAccount(self):
"""Test Account"""
# FIXME: construct object with mandatory attributes with example values
# model = clicksend_client.models.account.Account() # noqa: E501
pass
The only part that might do something is commented out. Technically, it does pass, (litterally, in this case), so Travis CI probably thinks it's fine. Most of the tests follow a similar pattern - some of them perform a setup step or so, but they don't do anything else.
I'm guessing, then, that this library is entirely untested? If this is the case, I wouldn't consider using this in a production app.
I said openpyxl in the title, I meant to say python-docx
I'm trying to use your upload API to prepare to send a letter through the mail API. I am finding that MS Word documents created through python-docx are not valid.
{
'data': None,
'http_code': 400,
'response_code': 'BAD_REQUEST',
'response_msg': 'Invalid file. File Extension: bin is not supported.'
}
For additional context, here is the script that produced the above output.
We have a strange problem when we try to install clicksend-client==1.0.0
via pip install -r requirements.txt
or simply pip install clicksend-client==1.0.0
command.
this is the command output:
Collecting clicksend-client==1.0.0 (from -r requirements.txt (line 1))
ERROR: Could not find a version that satisfies the requirement clicksend-client==1.0.0 (from -r requirements.txt (line 1)) (from versions: 5.0.41)
ERROR: No matching distribution found for clicksend-client==1.0.0 (from -r requirements.txt (line 1))
the strange thing is that installing the client with pip install clicksend-client
works:
(venv) ➜ testdir# pip install clicksend-client
Collecting clicksend-client
Collecting urllib3>=1.15 (from clicksend-client)
Using cached https://files.pythonhosted.org/packages/e6/60/247f23a7121ae632d62811ba7f273d0e58972d75e58a94d329d51550a47d/urllib3-1.25.3-py2.py3-none-any.whl
Collecting python-dateutil (from clicksend-client)
Using cached https://files.pythonhosted.org/packages/41/17/c62faccbfbd163c7f57f3844689e3a78bae1f403648a6afb1d0866d87fbb/python_dateutil-2.8.0-py2.py3-none-any.whl
Collecting six>=1.10 (from clicksend-client)
Using cached https://files.pythonhosted.org/packages/73/fb/00a976f728d0d1fecfe898238ce23f502a721c0ac0ecfedb80e0d88c64e9/six-1.12.0-py2.py3-none-any.whl
Collecting certifi (from clicksend-client)
Downloading https://files.pythonhosted.org/packages/69/1b/b853c7a9d4f6a6d00749e94eb6f3a041e342a885b87340b79c1ef73e3a78/certifi-2019.6.16-py2.py3-none-any.whl (157kB)
|████████████████████████████████| 163kB 123kB/s
Installing collected packages: urllib3, six, python-dateutil, certifi, clicksend-client
Successfully installed certifi-2019.6.16 clicksend-client-1.0.0 python-dateutil-2.8.0 six-1.12.0 urllib3-1.25.3
it seems that it's the version number issue, but the latest command is installing the v1.0.0 either...
could you please check this issue because it's breaking our CI system.
Thanks.
p.s.
Python version: 3.7
pip version: 19.1.1
The reason for this is exactly as described in this post:
https://stackoverflow.com/questions/34005930/multiprocessing-semlock-is-not-implemented-when-running-on-aws-lambda/41541253
A solution would be for there to be an API client configuration option to turn off the use of multiprocessing pools and just make single threaded requests.
According to the documentation, this should work:
# Calculate voice price
api_response = api_instance.voice_price_post(voice_messages)
# ERROR:
Traceback (most recent call last):
api_response = api_instance.voice_price_post(voice_messages)
AttributeError: 'AccountApi' object has no attribute 'voice_price_post'
And this method is indeed missing from the source code also. I have the latest version from here: git clone https://github.com/ClickSend/clicksend-python.git && cd clicksend-python && python3 -m pip install .
Should I be using the VoiceApi
class from clicksend_client/api/voice_api.py
?
Calls to allowed_email_address_get
return a string object which is not nice to evaluate the API response afterwards.
I used the following workaround to get a dictionary object for the response:
api_response = api_instance.allowed_email_address_get()
allowed = eval(api_response)
# now allowed.get('data') works
Would be best to get the dictionary object directly from allowed_email_address_get
and not rely on being able to use eval
for the returned string.
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.