Package: singlestore-demo
SingleStore-demo - S2GenerateGeneration of a simple datasource for SingleStoreThis python script creates a database and fills it up with data to perform several types of testing on a SingleStore DB.Easy to use. Using pip to installFast. Creates the database and data with several K of data in a couple minutes.FeaturesCan change the number of records to be inserted.Can change the database schema. Limited.TechSingleStore-demo uses a number of open source projects to work properly:[Python] - HTML enhanced for web apps!singlestoredb-python- SingleStore DB Python connector.numpy- NumPy is the fundamental package for scientific computing with Python.mimesis- Mimesis is a high-performance fake data generator for PythonAnd of course SingleStore-demo itself is open sources2generatoron GitHub.InstallationSingleStore-demo requires Python v3.10+ and Pip v22.0+ to run.Check the current version of installed Python and Pip by running:$ python3 -V
Python 3.10.6
$ pip -V
pip 22.0.2 from /usr/lib/python3/dist-packages/pip (python 3.10)To install the script you need to run Pip, all the dependencies will be installed using a single command.$pipinstallsinglestore-demo
Defaultingtouserinstallationbecausenormalsite-packagesisnotwriteable
Collectingsinglestore-demoUsingcachedsinglestore_demo-1.0.5-py3-none-any.whl(8.0kB)Collectingnumpy>=1.24.1Usingcachednumpy-1.24.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl(17.3MB)Collectingmimesis>=4.1.3Usingcachedmimesis-7.0.0-py3-none-any.whl(4.4MB)Collectingsinglestoredb>=0.5.3Usingcachedsinglestoredb-0.5.3-cp36-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl(213kB)Requirementalreadysatisfied:PyJWTin/usr/lib/python3/dist-packages(fromsinglestoredb>=0.5.3->singlestore-demo)(2.3.0)Requirementalreadysatisfied:wheelin/usr/lib/python3/dist-packages(fromsinglestoredb>=0.5.3->singlestore-demo)(0.37.1)Requirementalreadysatisfied:sqlparamsin./.local/lib/python3.10/site-packages(fromsinglestoredb>=0.5.3->singlestore-demo)(5.0.0)Requirementalreadysatisfied:buildin./.local/lib/python3.10/site-packages(fromsinglestoredb>=0.5.3->singlestore-demo)(0.9.0)Requirementalreadysatisfied:requestsin/usr/lib/python3/dist-packages(fromsinglestoredb>=0.5.3->singlestore-demo)(2.25.1)Requirementalreadysatisfied:packaging>=19.0in./.local/lib/python3.10/site-packages(frombuild->singlestoredb>=0.5.3->singlestore-demo)(23.0)Requirementalreadysatisfied:tomli>=1.0.0in./.local/lib/python3.10/site-packages(frombuild->singlestoredb>=0.5.3->singlestore-demo)(2.0.1)Requirementalreadysatisfied:pep517>=0.9.1in./.local/lib/python3.10/site-packages(frombuild->singlestoredb>=0.5.3->singlestore-demo)(0.13.0)Installingcollectedpackages:numpy,mimesis,singlestoredb,singlestore-demo
Successfullyinstalledmimesis-7.0.0numpy-1.24.1singlestore-demo-1.0.4singlestoredb-0.5.3RunTo runs2generatecommandArgumentsArgumentDefault ValueDescription--hostlocalhostThe hostname of the SingleStoreDB node to connect to--port3306The port of the SingleStoreDB node to connect to--usernamerootThe username of the SingleStoreDB user with permissions to create a database.--passwordThe password of the SingleStoreDB user specified.--rows-per-insert10000The number of rows to send to SingleStore at once-total-orders10The total number of orders * rows per insert--total-suppliers1The total number of suppliers * rows per insert--total-parts20The total number of parts * rows per insert--total-parts-suppliers80The total number of parts on suppliers * rows per insert--total-customers15The total number of customers * rows per insert--lineitem-max10The Maximum number of line items per order--lineitem-min4The Minimum number of line items per order--only-ordersOnly adds a new orders to the database. Doesn't drop the database--schemaThe database schema file.To add more orders only you can runs2generate --only-ordersDevelopmentWant to contribute, great...Currently we are accepting ideas for more tables or complex types to improve the provided database.LicenseMIT LicenseCopyright (c) 2023 singlestore_demoPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.