Skip to main content
Warning: You are using the test version of PyPI. This is a pre-production deployment of Warehouse. Changes made here affect the production instance of TestPyPI (testpypi.python.org).
Help us improve Python packaging - Donate today!

Loads a CSV file a creates a preloaded SQLite database

Project Description

csv-to-SQLite
=======

This class accepts a csv file and puts the contents into an SQLite database table.
This pre--population is important in cases where you have to convert a csv file into an SQLite database and also
when there is the need to have a prepopulated SQLite DB to use as a resource in mobile development.


how to install
-------
```sh
$ pip install csv-to-SQLite
```

usage
-----

```sh
usage: csv-to-SQLite [options] <command>
```

example
--------
move CSV file into working directory and cd into working directory

```sh
$ cd /path/to/project
```

creating a simple SQLite Database

```sh
$ migrate create -e sqlite3 -d /path/to/test.db -m "create users table"
```

this generates the up and down files using the current timestamp and message in the current revision folder
```sh
$ ls -R migrations/
1



running with sample configuration example: config.ini

```
[dev]
database = /path/to/test.db
engine = sqlite3

[prod]
migration_path = /path/to/prod/migrations
database = DB_NAME
user = DB_USER
password = DB_PASSWORD
host = DB_HOST
engine = ENGINE
```

execute with configuration for a particular revision using a preferred environment

```sh
$ migrate reset -f config.ini --env prod
```

you may put a *.migrate* configuration file in INI format in your project directory to be used by default

commands
--------
| Command | Description |
| ------- | ----------- |
| create | Create a migration. Specify "--rev 0" to add a new revision |
| up | Upgrade from a revision to the latest |
| down | Downgrade from the latest to a lower revision |
| reset | Rollback and re-run to the current revision |

Any migration operation will stop when errors are encountered in any of the scripts. To ignore errors use the
*--skip-errors* option.

For more options

```sh
$ migrate -h
```

license
-------
MIT

Release History

This version
History Node

0.1

Download Files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

File Name & Hash SHA256 Hash Help Version File Type Upload Date
csv-to-SQLite-0.1.tar.gz
(3.1 kB) Copy SHA256 Hash SHA256
Source Mar 7, 2016

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting