• Stars
    star
    112
  • Rank 310,394 (Top 7 %)
  • Language
    Python
  • License
    MIT License
  • Created about 4 years ago
  • Updated about 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A simple async wrapper for sqlite3

asqlite

A simple and easy to use async wrapper for sqlite3.

This is basically the same as sqlite3 except you use async with and await in front of most operations.

import asyncio
import asqlite

async def main():
    async with asqlite.connect('example.db') as conn:
        async with conn.cursor() as cursor:
            # Create table
            await cursor.execute('''CREATE TABLE stocks
                                    (date text, trans text, symbol text, qty real, price real)''')

            # Insert a row of data
            await cursor.execute("INSERT INTO stocks VALUES ('2006-01-05','BUY','RHAT',100,35.14)")

            # Save (commit) the changes
            await conn.commit()

asyncio.run(main())

Differences from sqlite3

This module differs from sqlite3 in a few ways:

  1. Connections are created with journal_mode set to wal.
  2. Connections have foreign keys enabled by default.
  3. Implicit transactions are turned off
  4. The row_factory is set to sqlite3.Row.

License

MIT

More Repositories

1

discord.py

An API wrapper for Discord written in Python.
Python
14,368
star
2

RoboDanny

A discord bot for servers that I like.
Python
797
star
3

discord-ext-menus

Python
232
star
4

sol

A C++11 Lua wrapper
C++
205
star
5

cpp-sublime-snippet

C++11 Sublime Text Snippets
JavaScript
92
star
6

eos

A simple and easy to use datetime library for Rust
Rust
51
star
7

jimaku

A site for hosting (Japanese) subtitles
Rust
38
star
8

discord-event-bot

Python
34
star
9

discord-ext-native-voice

Rust
33
star
10

Reddit-Imgur-Scraper

Python script that scraps images from imgur on reddit.
Python
30
star
11

DoxyDoc

A sublime text plugin for C++ document autocompletion
Python
27
star
12

power-tabs

Vertical tab groups for Firefox
JavaScript
25
star
13

Gears

C++ Utilities
C++
25
star
14

jsonpp

C++11 JSON parser and writer
C++
21
star
15

aoc2021

Solutions for Advent of Code 2021
Rust
15
star
16

open-collective-discord-auth

The server component for Open Collective Linked Role integration
TypeScript
15
star
17

gum

Thin C++11 SDL 2 wrapper with other nice things.
C++
15
star
18

google-lens-ocr

A simple CLI to invoke Google Lens OCR
Rust
6
star
19

Sky

SFML tools to aid in game development.
C++
5
star
20

sqlitexx

A C++14 SQLite3 wrapper
C++
4
star
21

Lia

List comprehensions for C++
C++
3
star
22

hacktober-cheese

Cheese
3
star
23

Shinobi

A meta build system for ninja
C++
2
star
24

git-utils

Scripts that I use for custom git commands.
Shell
1
star
25

compo-two

2nd Great Lounge Game Jam.
Lua
1
star
26

rapptz.github.io

Github page for my projects.
CSS
1
star
27

sen.py

A pseudo meta build system for ninja.
Python
1
star
28

splatoon

Splatoon data related nonsense.
1
star
29

Project-Euler

Project Euler solutions
C++
1
star
30

anitomy-rs

A pure Rust port of anitomy, an anime filename parser
Rust
1
star
31

libnet

A C++11 library for networking.
C++
1
star