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.
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
zdownload_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...
- Convert a CSV file to SQL in 2021 with SQLizer.io The most recently-updated version of SQLizer converting CSV to SQL. Convert your own CSV file to SQL now, for free. Video: SQLizer is free for...
- SQLizer adds support for custom delimiters SQLizer v3.0.5 has been released and here’s the headlines: Custom delimiters! We’ve moved tab delimiters into the new csv/tsv category, so you’ll now have the...
- Multiple API keys in your SQLizer developer account The SQLizer file to database conversion API is a powerful technology for harnessing the power of our file conversion engine in your own software. It’s...
- SQLizer now detects your Excel Worksheets automatically No more hassle of choosing the right sheet or cell range to convert Microsoft Excel spreadsheets are one of the most common files our users...