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...
- Learning SQL for Beginners in 2024 It’s a data-driven world, and SQL (Structured Query Language) is akin to a treasure map leading to valuable insights. Whether you’re a budding programmer or...
- SQLizer Pricing Update Dear SQLizer Community, We value your continued support and trust in SQLizer. Today, we’re announcing an important change that affects our pricing structure. Why the...
- How to convert XML to SQL: The Clever Way [Updated 2023] To convert XML to SQL some wizardry is needed. Unlike CSV files and database tables, XML files aren’t naturally organized into rows and columns: XML...
- How to convert JSON to SQL - the quick and easy way [Updated 2023] 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...