This is a fork of mysqlclient-python.
This project is designed to be used with TileDB-SQL which is a reduced build of MariaDB with support for using the MyTile storage engine for accessing TileDB Arrays.
This is not meant to be used a general purpose MariaDB Client, it is only meant to be used with linking against the embedded version of MariaDB. This has been tested only with MariaDB 10.4 and the MyTile storage engine.
A docker image is available on dockerhub under tiledb/tiledb-sql-py. This docker image will drop you into a python shell and has tiledb, tiledb-sql-py, pandas and numpy preinstalled.
docker run -it --rm tiledb/tiledb-sql-py
Conda packages will be available on conda forge soon.
conda install -c conda-forge tiledb-sql
A pypi package will be build from conda using conda-press
pip install tiledb-sql
You may need to install the Python development headers and compile MariaDB from source
sudo apt-get install python-dev default-libmysqlclient-dev
# Debian / Ubuntusudo yum install python-devel mysql-devel
# Red Hat / CentOSbrew install mysql-connector-c
# macOS (Homebrew) (Currently, it has bug. See below)
On Windows, there are binary wheels you can install without MySQLConnector/C or MSVC.
Please follow the MyTile compilation instructions
If you've installed mytile into $HOME/mytile_server
simply build the python package with:
PATH="$HOME/mytile_server/bin:${PATH}" python setup.py build_ext --inplace
Now you can use it with
import tiledb.sql
import pandas
db = tiledb.sql.connect(db="test")
pd.read_sql(sql="select * from `s3://my_bucket/my_array`, con=db)
Documentation is hosted on TileDB Developer Docs