flowroute / flowroute-sdk-v3-python Goto Github PK
View Code? Open in Web Editor NEWFlowroute SDK v3 for Python which interacts with Numbers v2 (including routes, e911 addresses, and CNAM storage) and Messages v2.1.
License: Other
Flowroute SDK v3 for Python which interacts with Numbers v2 (including routes, e911 addresses, and CNAM storage) and Messages v2.1.
License: Other
Would suggest instead of "import StringIO" in cdrs_controller.py
try:
from StringIO import StringIO ## for Python 2
except ImportError:
from io import StringIO ## for Python 3
And instead of "import urllib2" in cdrs_controller.py
try:
from urllib.request import urlopen #For Python 3.0 and later
except ImportError:
from urllib2 import urlopen #For Python 2's urllib2
There are some equality check SyntaxWarnings, which end up taking up space in the logs on each run:
2022-04-02T11:54:13.750-04:00 /opt/python/lib/python3.9/site-packages/flowroutenumbersandmessaging/api_helper.py:128: SyntaxWarning: "is" with a literal. Did you mean "=="?
2022-04-02T11:54:13.750-04:00 if formatting is "unindexed":
2022-04-02T11:54:13.750-04:00 /opt/python/lib/python3.9/site-packages/flowroutenumbersandmessaging/api_helper.py:130: SyntaxWarning: "is" with a literal. Did you mean "=="?
2022-04-02T11:54:13.750-04:00 elif formatting is "indexed":
2022-04-02T11:54:13.750-04:00 /opt/python/lib/python3.9/site-packages/flowroutenumbersandmessaging/api_helper.py:132: SyntaxWarning: "is" with a literal. Did you mean "=="?
2022-04-02T11:54:13.750-04:00 elif formatting is "plain":
2022-04-02T11:54:13.750-04:00 /opt/python/lib/python3.9/site-packages/flowroutenumbersandmessaging/api_helper.py:203: SyntaxWarning: "is" with a literal. Did you mean "=="?
2022-04-02T11:54:13.750-04:00 if array_serialization is "csv":
2022-04-02T11:54:13.750-04:00 /opt/python/lib/python3.9/site-packages/flowroutenumbersandmessaging/api_helper.py:206: SyntaxWarning: "is" with a literal. Did you mean "=="?
2022-04-02T11:54:13.750-04:00 elif array_serialization is "psv":
2022-04-02T11:54:13.750-04:00 /opt/python/lib/python3.9/site-packages/flowroutenumbersandmessaging/api_helper.py:209: SyntaxWarning: "is" with a literal. Did you mean "=="?
2022-04-02T11:54:13.750-04:00 elif array_serialization is "tsv":
Simple fix -- replace all of the is
on listed lines in api_helper.py
(lines: 128, 130, 132, 203, 206, 209) with ==
StringIO is not in Python3.
It is now in the io library
File "c:\flask\unifymn\venv\lib\site-packages\flowroutenumbersandmessaging\controllers\cdrs_controller.py", line 11, in <module> import StringIO ModuleNotFoundError: No module named 'StringIO'
Urllib2 is not in python3.
File "c:\flask\unifymn\venv\lib\site-packages\flowroutenumbersandmessaging\controllers\cdrs_controller.py", line 13, in <module> import urllib2 ModuleNotFoundError: No module named 'urllib2'
Greetings, and apologies if this is the wrong place to ask.
I am interested in using this API call:
https://developer.flowroute.com/api/numbers/v2.0/set-a-messaging-callback-url-for-phone-number/
I am wondering if this is available in this python v3 SDK , and if an example could be provided?
We are hoping to set the callback URL on numbers specifically, rather than an account-wide setting.
Regards,
Kevin Long
API reference specifies iso_country and number_type as available query parameters for Search for Purchasable Phone Numbers
However it is not available in this libraries search_for_purchasable_phone_numbers function.
Poster and Unirest are no longer supported unless you're using python 2. If you guys could please update that. You can use poster3==0.8.1 and requests==2.7.0 as replacements which work for python 3
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.