SQLizer Python library now available on Pypi
Use this library to convert CSV, JSON, Excel or XML files to SQL databases within your python projects.
It’s finally here! One of our most-requested features has landed - a python client library so you can harness the power of SQLizer inside your python projects.
All plans come with an API key (even free plans) so there’s no reason not to dive in and experiment.
Find the SQLizer python package here, and the package source code over here.
Getting Started
Install the library using pip, by typing at the command line:
pip install sqlizer-io-client
To use the converter, import the sqlizer module, then set your API Key value. You can find your API keys on your Account Page. Create a sqlizer.File object passing in the conversion parameters. Call convert()
, then z
download_result_file()`. For example:
import sqlizer
sqlizer.config.API_KEY = 'your-api-key'
with open('example.xlsx', mode='rb') as file_content:
converter = sqlizer.File(file_content, sqlizer.DatabaseType.MySQL, sqlizer.FileType.XLSX, 'example.xlsx', 'my_table')
converter.convert(wait=True)
print(converter.download_result_file().text)
The library is available now, enjoy!
You might also be interested in our .net SDK for SQLizer if you’re more of a .NET person than a Python person. 🐍
🖤 The SQLizer Team
Psssst… Thanks for reading this blog post. If you have a >5000 row CSV file you need to convert, use code CONVERTME10
for 10% off your Pro Monthly plan for the first 12 months, or a one-off 10% discount on your Pro Annual plan.
More from The Official SQLizer blog...
- All new: A JavaScript Client for SQLizer on npm Rejoice, JS developers! A JavaScript client library for SQLizer.io, easily converting CSV, JSON, XML and Spreadsheet files into SQL INSERT or UPDATE statements - is...
- [Update 2024] Convert JSON to SQL: Free and Fast If you want to convert JSON to SQL there’s no concrete or straightforward way of doing things. Conversion is usually tricky because JSON and SQL...
- [Update 2024] Convert XML to SQL Easy and Free To convert XML to SQL, a touch of wizardry is needed. Unlike CSV files and database tables, XML files aren’t naturally organized into rows and...
- [Update 2024] Converting a Word Doc to SQL with SQLizer Wait, what? A Word document? Have you ever found yourself faced with a Word document containing a wealth of data, all neatly structured in a...