puchikarui


Namepuchikarui JSON
Version 0.1 PyPI version JSON
download
home_pagehttps://github.com/letuananh/puchikarui/
SummaryA minimalist SQLite wrapper library for Python which supports ORM features.
upload_time2021-05-13 07:49:34
maintainer
docs_urlNone
authorLe Tuan Anh
requires_python
licenseMIT License
keywords sqlite sqlite3 database
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI
coveralls test coverage No coveralls.
            Puchikarui
==========

A minimalist SQLite helper library for Python 3 which supports ORM features.

[![Documentation Status](https://readthedocs.org/projects/puchikarui/badge/?version=latest)](https://puchikarui.readthedocs.io/en/latest/?badge=latest)
[![Total alerts](https://img.shields.io/lgtm/alerts/g/letuananh/puchikarui.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/letuananh/puchikarui/alerts/)
[![Language grade: Python](https://img.shields.io/lgtm/grade/python/g/letuananh/puchikarui.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/letuananh/puchikarui/context:python)
[![Build Status](https://travis-ci.org/letuananh/puchikarui.svg?branch=master)](https://travis-ci.org/letuananh/puchikarui)
[![codecov](https://codecov.io/gh/letuananh/puchikarui/branch/master/graph/badge.svg?token=10CEOU8F8M)](https://codecov.io/gh/letuananh/puchikarui)

## Installation

`puchikarui` is available on [PyPI](https://pypi.org/project/puchikarui/) and can be installed using `pip`.

```bash
pip install puchikarui
# or with python -m pip
python3 -m pip install puchikarui
```

## Sample code

```python
from puchikarui import Database

INIT_SCRIPT = '''
CREATE TABLE person (
       ID INTEGER PRIMARY KEY AUTOINCREMENT,
       name TEXT,
       age INTEGER
);
'''

class PeopleDB(Database):
  def __init__(self, *args, **kwargs):
        super().__init__(*args, **kwargs)
        self.add_script(INIT_SCRIPT)
        self.add_table('person', ['ID', 'name', 'age'], id_cols=('ID',))


db = PeopleDB('test.db')
people = db.person.select()
# create sample people records in the first run
if not people:
  print("Creating people records ...")
  for name, age in zip('ABCDE', range(20, 25)):
    db.person.insert(f'Person {name}', age)
  people = db.person.select()

print("All people")
print("----------------------")
for person in people:
  print(person.ID, person.name, person.age)
```

For more information please see [puchikarui documentation](https://puchikarui.readthedocs.io>).

## Why puchikarui

`puchikarui` is a tiny, 100% pure-Python library that provides extra functionality to Python 3's [sqlite3](https://docs.python.org/3/library/sqlite3.html) module. 
It helps working directly with `sqlite3` easier, with less magic, and more control, rather than hiding sqlite3 module away from the users.

Although `puchikarui` does provide some ORM-like features, it is *NOT* an ORM library. 
If you want ORM features, please consider [PonyORM](https://ponyorm.org/), [SQLAlchemy](https://www.sqlalchemy.org/), or [peewee](https://github.com/coleifer/peewee).

## Meaning

The name `puchikarui` came from two Japanese words `プチ` (puchi) which means small, and `軽い` (karui), which means light, soft, and gentle.

It represents the motivation for developing this library: a tiny, lightweight library that makes working with `sqlite3` simpler.

```bash
$ python3 -m jamdict lookup "プチ"
========================================
Found entries
========================================
Entry: 1115200 | Kj:   | Kn: プチ
--------------------
1. small ((prefix))

$ python3 -m jamdict lookup "軽い"
========================================
Found entries
========================================
Entry: 1252560 | Kj:  軽い | Kn: かるい, かろい
--------------------
1. light (i.e. not heavy)/feeling light (i.e. offering little resistance, moving easily) ((adjective (keiyoushi)))
2. light (i.e. of foot)/effortless/nimble/agile ((adjective (keiyoushi)))
3. non-serious/minor/unimportant/trivial ((adjective (keiyoushi)))
4. slight/small/gentle/soft/easy/lighthearted (e.g. joke) ((adjective (keiyoushi)))
5. easy/simple ((adjective (keiyoushi)))
6. indiscriminate ((adjective (keiyoushi)))
```
            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/letuananh/puchikarui/",
    "name": "puchikarui",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "SQLite sqlite3 database",
    "author": "Le Tuan Anh",
    "author_email": "tuananh.ke@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/08/6d/6a3c0d98bdc128ed85baa111754de61fc4d415ba42b7516fb7ee1dd0e13d/puchikarui-0.1.tar.gz",
    "platform": "any",
    "description": "Puchikarui\n==========\n\nA minimalist SQLite helper library for Python 3 which supports ORM features.\n\n[![Documentation Status](https://readthedocs.org/projects/puchikarui/badge/?version=latest)](https://puchikarui.readthedocs.io/en/latest/?badge=latest)\n[![Total alerts](https://img.shields.io/lgtm/alerts/g/letuananh/puchikarui.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/letuananh/puchikarui/alerts/)\n[![Language grade: Python](https://img.shields.io/lgtm/grade/python/g/letuananh/puchikarui.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/letuananh/puchikarui/context:python)\n[![Build Status](https://travis-ci.org/letuananh/puchikarui.svg?branch=master)](https://travis-ci.org/letuananh/puchikarui)\n[![codecov](https://codecov.io/gh/letuananh/puchikarui/branch/master/graph/badge.svg?token=10CEOU8F8M)](https://codecov.io/gh/letuananh/puchikarui)\n\n## Installation\n\n`puchikarui` is available on [PyPI](https://pypi.org/project/puchikarui/) and can be installed using `pip`.\n\n```bash\npip install puchikarui\n# or with python -m pip\npython3 -m pip install puchikarui\n```\n\n## Sample code\n\n```python\nfrom puchikarui import Database\n\nINIT_SCRIPT = '''\nCREATE TABLE person (\n       ID INTEGER PRIMARY KEY AUTOINCREMENT,\n       name TEXT,\n       age INTEGER\n);\n'''\n\nclass PeopleDB(Database):\n  def __init__(self, *args, **kwargs):\n        super().__init__(*args, **kwargs)\n        self.add_script(INIT_SCRIPT)\n        self.add_table('person', ['ID', 'name', 'age'], id_cols=('ID',))\n\n\ndb = PeopleDB('test.db')\npeople = db.person.select()\n# create sample people records in the first run\nif not people:\n  print(\"Creating people records ...\")\n  for name, age in zip('ABCDE', range(20, 25)):\n    db.person.insert(f'Person {name}', age)\n  people = db.person.select()\n\nprint(\"All people\")\nprint(\"----------------------\")\nfor person in people:\n  print(person.ID, person.name, person.age)\n```\n\nFor more information please see [puchikarui documentation](https://puchikarui.readthedocs.io>).\n\n## Why puchikarui\n\n`puchikarui` is a tiny, 100% pure-Python library that provides extra functionality to Python 3's [sqlite3](https://docs.python.org/3/library/sqlite3.html) module. \nIt helps working directly with `sqlite3` easier, with less magic, and more control, rather than hiding sqlite3 module away from the users.\n\nAlthough `puchikarui` does provide some ORM-like features, it is *NOT* an ORM library. \nIf you want ORM features, please consider [PonyORM](https://ponyorm.org/), [SQLAlchemy](https://www.sqlalchemy.org/), or [peewee](https://github.com/coleifer/peewee).\n\n## Meaning\n\nThe name `puchikarui` came from two Japanese words `\u30d7\u30c1` (puchi) which means small, and `\u8efd\u3044` (karui), which means light, soft, and gentle.\n\nIt represents the motivation for developing this library: a tiny, lightweight library that makes working with `sqlite3` simpler.\n\n```bash\n$ python3 -m jamdict lookup \"\u30d7\u30c1\"\n========================================\nFound entries\n========================================\nEntry: 1115200 | Kj:   | Kn: \u30d7\u30c1\n--------------------\n1. small ((prefix))\n\n$ python3 -m jamdict lookup \"\u8efd\u3044\"\n========================================\nFound entries\n========================================\nEntry: 1252560 | Kj:  \u8efd\u3044 | Kn: \u304b\u308b\u3044, \u304b\u308d\u3044\n--------------------\n1. light (i.e. not heavy)/feeling light (i.e. offering little resistance, moving easily) ((adjective (keiyoushi)))\n2. light (i.e. of foot)/effortless/nimble/agile ((adjective (keiyoushi)))\n3. non-serious/minor/unimportant/trivial ((adjective (keiyoushi)))\n4. slight/small/gentle/soft/easy/lighthearted (e.g. joke) ((adjective (keiyoushi)))\n5. easy/simple ((adjective (keiyoushi)))\n6. indiscriminate ((adjective (keiyoushi)))\n```",
    "bugtrack_url": null,
    "license": "MIT License",
    "summary": "A minimalist SQLite wrapper library for Python which supports ORM features.",
    "version": "0.1",
    "split_keywords": [
        "sqlite",
        "sqlite3",
        "database"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "md5": "35be488f12a679d68b30fcb9e1b48502",
                "sha256": "8ebe96e8683eac82624eb90dd517e26421e467637b3a1fe1ef5275ba2dacddc8"
            },
            "downloads": -1,
            "filename": "puchikarui-0.1.tar.gz",
            "has_sig": false,
            "md5_digest": "35be488f12a679d68b30fcb9e1b48502",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 15463,
            "upload_time": "2021-05-13T07:49:34",
            "upload_time_iso_8601": "2021-05-13T07:49:34.980401Z",
            "url": "https://files.pythonhosted.org/packages/08/6d/6a3c0d98bdc128ed85baa111754de61fc4d415ba42b7516fb7ee1dd0e13d/puchikarui-0.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2021-05-13 07:49:34",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "github_user": "letuananh",
    "github_project": "puchikarui",
    "travis_ci": true,
    "coveralls": false,
    "github_actions": false,
    "requirements": [],
    "lcname": "puchikarui"
}
        
Elapsed time: 0.01982s