Skip to content

Commit 5bbd35e

Browse files
authored
Merge pull request #20 from aosingh/dev/v1.3.0
v1.3.0
2 parents 78a2230 + 18fda70 commit 5bbd35e

42 files changed

Lines changed: 1170 additions & 943 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.coveragerc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ source = sqlite_rx
55
concurrency =
66
thread
77
multiprocessing
8-
debug =
8+
debug =
99
multiproc
1010
omit =
1111
/*/tests/*
@@ -14,8 +14,8 @@ omit =
1414
/home/travis/virtualenv/*
1515
./sqlite_rx/run_client.py
1616
./sqlite_rx/start_server.py
17-
# plugins =
17+
# plugins =
1818
# billiard_coverage_plugin
1919

2020
[html]
21-
directory = htmlcov
21+
directory = htmlcov

.dockerignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,3 @@ start_server.py
1818
run_client.py
1919
curve_client.py
2020
.github
21-

.github/workflows/sqlite_build.yaml

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,14 @@ jobs:
99
fail-fast: false
1010
matrix:
1111
os: [macos-latest, windows-latest, ubuntu-latest]
12-
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12', 'pypy-3.8', 'pypy-3.9', 'pypy3.10']
12+
python-version: ['3.10', '3.11', '3.12', '3.13', '3.14', 'pypy3.10', 'pypy3.11']
1313

1414
steps:
1515
- name: Checkout
16-
uses: actions/checkout@v4
16+
uses: actions/checkout@v6
1717

1818
- name: Setup Python ${{ matrix.python-version }}
19-
uses: actions/setup-python@v5
19+
uses: actions/setup-python@v6
2020
with:
2121
python-version: ${{ matrix.python-version }}
2222

@@ -25,11 +25,9 @@ jobs:
2525
python3 -m pip install --upgrade pip setuptools
2626
pip install pytest coverage
2727
pip install -e .
28-
pip install coverage
29-
28+
3029
- name: Run Unittests
3130
run: |
3231
coverage run -m pytest --verbose sqlite_rx/tests
3332
coverage combine
3433
coverage report -m
35-

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,3 @@ start_server.py
1515
run_client.py
1616
curve_client.py
1717
.pypy3venv/
18-

.pre-commit-config.yaml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
repos:
2+
- repo: https://github.com/pre-commit/pre-commit-hooks
3+
rev: v4.4.0
4+
hooks:
5+
- id: trailing-whitespace
6+
- id: end-of-file-fixer
7+
- id: check-yaml
8+
- id: check-added-large-files
9+
args: ['--maxkb=2000']
10+
- repo: https://github.com/psf/black-pre-commit-mirror
11+
rev: 24.4.2
12+
hooks:
13+
- id: black
14+
- repo: https://github.com/astral-sh/ruff-pre-commit
15+
rev: v0.0.291
16+
hooks:
17+
- id: ruff
18+
args: ["check", "--select", "I", "--fix"]

Dockerfile

Lines changed: 27 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,25 @@
1-
FROM python:3.10.5-slim as base
1+
FROM python:3-slim AS base
22

3+
ARG USERNAME=sqliteuser
4+
ARG UID=1001
5+
ARG GID=1001
6+
ARG HOME_DIR=/home/${USERNAME}
7+
8+
# Upgrade OS packages
9+
RUN set -ex \
10+
&& apt-get update \
11+
&& apt-get upgrade -y \
12+
&& apt-get autoremove -y \
13+
&& apt-get clean \
14+
&& rm -rf /var/lib/apt/lists/*
15+
16+
# Create the group and user
17+
RUN groupadd --gid ${GID} ${USERNAME} \
18+
&& useradd -m -u ${UID} -g ${GID} -d ${HOME_DIR} -s /bin/bash ${USERNAME}
19+
20+
RUN chown ${USER_NAME}:${USERNAME} ${HOME_DIR}
21+
22+
FROM base AS builder
323
COPY . /sqlite_rx
424

525
WORKDIR /svc
@@ -10,10 +30,13 @@ RUN pip install wheel && pip wheel --wheel-dir=/svc/wheels /sqlite_rx[cli]
1030
RUN rm -rf /sqlite_rx
1131

1232

13-
FROM python:3.10.5-slim
33+
FROM base
1434

15-
COPY --from=base /svc /svc
35+
COPY --from=builder /svc /svc
1636
WORKDIR /svc
1737

1838
RUN pip install --upgrade pip
19-
RUN pip install --no-index /svc/wheels/*.whl
39+
RUN pip install --no-index /svc/wheels/*.whl
40+
41+
USER ${USERNAME}
42+
WORKDIR ${HOME_DIR}

README.md

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,22 @@
1-
# sqlite_rx
1+
# sqlite_rx
22
[![PyPI version](https://badge.fury.io/py/sqlite-rx.svg)](https://pypi.python.org/pypi/sqlite-rx) [![sqlite-rx](https://github.com/aosingh/sqlite_rx/actions/workflows/sqlite_build.yaml/badge.svg)](https://github.com/aosingh/sqlite_rx/actions) [![Downloads](https://pepy.tech/badge/sqlite-rx)](https://pepy.tech/project/sqlite-rx)
33

44

5-
[![Python 3.8](https://img.shields.io/badge/python-3.8-blue.svg)](https://www.python.org/downloads/release/python-380/)
6-
[![Python 3.9](https://img.shields.io/badge/python-3.9-blue.svg)]((https://www.python.org/downloads/release/python-390/))
75
[![Python 3.10](https://img.shields.io/badge/python-3.10-blue.svg)](https://www.python.org/downloads/release/python-3100/)
86
[![Python 3.11](https://img.shields.io/badge/python-3.11-blue.svg)](https://www.python.org/downloads/release/python-3110/)
97
[![Python 3.12](https://img.shields.io/badge/python-3.12-blue.svg)](https://www.python.org/downloads/release/python-3120/)
8+
[![Python 3.13](https://img.shields.io/badge/python-3.13-blue.svg)](https://www.python.org/downloads/release/python-3130/)
9+
[![Python 3.14](https://img.shields.io/badge/python-3.14-blue.svg)](https://www.python.org/downloads/release/python-3140/)
1010

11-
12-
[![PyPy3.8](https://img.shields.io/badge/python-PyPy3.8-blue.svg)](https://www.pypy.org/download.html)
13-
[![PyPy3.9](https://img.shields.io/badge/python-PyPy3.9-blue.svg)](https://www.pypy.org/download.html)
11+
[![PyPy3.10](https://img.shields.io/badge/python-PyPy3.10-blue.svg)](https://www.pypy.org/download.html)
12+
[![PyPy3.11](https://img.shields.io/badge/python-PyPy3.11-blue.svg)](https://www.pypy.org/download.html)
1413

1514

1615
#### For documentation, usage and examples refer [https://aosingh.github.io/sqlite_rx/](https://aosingh.github.io/sqlite_rx/)
1716

1817
# Introduction
1918

20-
[SQLite](https://www.sqlite.org/index.html) is a lightweight database written in C.
19+
[SQLite](https://www.sqlite.org/index.html) is a lightweight database written in C.
2120
Python has in-built support to interact with the database (locally) which is either stored on disk or in memory.
2221

2322
With `sqlite_rx`, clients should be able to communicate with an `SQLiteServer` in a fast, simple and secure manner and execute queries remotely.
@@ -47,10 +46,10 @@ from sqlite_rx.server import SQLiteServer
4746

4847
def main():
4948

50-
# database is a path-like object giving the pathname
51-
# of the database file to be opened.
52-
53-
# You can use ":memory:" to open a database connection to a database
49+
# database is a path-like object giving the pathname
50+
# of the database file to be opened.
51+
52+
# You can use ":memory:" to open a database connection to a database
5453
# that resides in RAM instead of on disk
5554

5655
server = SQLiteServer(database=":memory:",
@@ -85,4 +84,3 @@ with client:
8584
8685
{'error': None, 'items': []}
8786
```
88-

docker-compose.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,4 @@ services:
1010
- data:/data
1111

1212
volumes:
13-
data: {}
13+
data: {}

docker_examples/docker-compose-curvezmq.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,4 @@ services:
1111
- /Users/as/.curve:/root/.curve
1212

1313
volumes:
14-
data: {}
14+
data: {}

docker_examples/docker-compose-ondisk.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,4 @@ services:
1010
- data:/data
1111

1212
volumes:
13-
data: {}
13+
data: {}

0 commit comments

Comments
 (0)