/usr/lib/python3/dist-packages/anosql-0.2.0.egg-info/PKG-INFO is in python3-anosql 0.2.0-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 | Metadata-Version: 1.0
Name: anosql
Version: 0.2.0
Summary: Easy SQL in Python
Home-page: https://github.com/honza/anosql
Author: Honza Pokorny
Author-email: me@honza.ca
License: UNKNOWN
Description-Content-Type: UNKNOWN
Description: anosql
======
.. image:: https://badge.fury.io/py/anosql.svg
:target: https://badge.fury.io/py/anosql
.. image:: http://readthedocs.org/projects/anosql/badge/?version=latest
:target: http://anosql.readthedocs.io/en/latest/?badge=latest
:alt: Documentation Status
.. image:: https://travis-ci.org/honza/anosql.svg?branch=master
:target: https://travis-ci.org/honza/anosql
A Python library for using SQL
*Warning: very alpha*
Inspired by the excellent `Yesql`_ library by Kris Jenkins. In my mother
tongue, *ano* means *yes*.
Installation
------------
::
$ pip install anosql
Usage
-----
Given a ``queries.sql`` file:
.. code-block:: sql
-- name: get-all-greetings
-- Get all the greetings in the database
SELECT * FROM greetings;
We can issue SQL queries, like so:
.. code-block:: python
import anosql
import psycopg2
import sqlite3
# PostgreSQL
conn = psycopg2.connect('...')
queries = anosql.load_queries('postgres', 'queries.sql')
# Or, Sqlite3...
conn = sqlite3.connect('cool.db')
queries = anosql.load_queries('sqlite', 'queries.sql')
queries = queries.get_all_greetings(conn)
# => [(1, 'Hi')]
queries.get_all_greetings.__doc__
# => Get all the greetings in the database
queries.get_all_greetings.__query__
# => SELECT * FROM greetings;
queries.available_queries
# => ['get_all_greetings']
Tests
-----
::
$ pip install tox
$ tox
Caveats
-------
Postgresql and sqlite only at the moment
License
-------
BSD, short and sweet
.. _Yesql: https://github.com/krisajenkins/yesql/
Platform: UNKNOWN
|