I want to do something like a Voicetext [] module in Python with CarSensor API []. Usually, I only have the code if I can use it, but I tried to make it by imitating it.
And, I made CarSensor-Web-API [].
** ★ Local environment ** MacBook Pro (13-inch, Mid 2012) Processor: 2.5 GHz Intel Core i5 Memory: 4 GB 1600 MHz DDR3
** ★ Language used ** Python json
For APIKEY registration and keyword processing, refer to Voicetext []. I created it while researching various things.
By the way, the Python module requires __init__.py
inside the folder, and you can refer to ʻimport` even if the hierarchy increases. Below is a sample code.
sample.py
import csapi
from csapi import parse
In addition, it will be the tree of the folder created this time.
As an additional function, I would like to be able to do [parser] parse etc.
I am creating a file called parse.py
.
Tree
Tree
├── csapi
│ ├── __init__.py
│ ├── parse.py
│ └── setup.py
└── test
└── api_test.py
This time, I tried to add [parser] parse as well as Python code. If the csapi module is added, it can also be accessed from commands.
As for future development, we still have only used car and catalog search API, so I would like to try installing with modules that can support other APIs and Python3 compatible & pip.
At the same time, please teach us about module design.
CarSensor API Voicetext parse CarSensor-Web-API
Recommended Posts