Skip to content

Commit 0c501f3

Browse files
committed
Initial release
1 parent 1300f68 commit 0c501f3

File tree

16 files changed

+10664
-0
lines changed

16 files changed

+10664
-0
lines changed

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,3 +127,7 @@ dmypy.json
127127

128128
# Pyre type checker
129129
.pyre/
130+
131+
# WingIDE project files
132+
*.wpr
133+
*.wpu

README.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
==========================
2+
Firebird driver for Python
3+
==========================
4+
5+
This package contains driver that uses new Firebird API introduced in Firebird 3.
6+
It also works ONLY with Python 3.8+.
7+

docs/Makefile

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Minimal makefile for Sphinx documentation
2+
#
3+
4+
# You can set these variables from the command line, and also
5+
# from the environment for the first two.
6+
SPHINXOPTS ?=
7+
SPHINXBUILD ?= sphinx-build
8+
SOURCEDIR = .
9+
BUILDDIR = _build
10+
11+
# Put it first so that "make" without argument is like "make help".
12+
help:
13+
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
14+
15+
.PHONY: help Makefile
16+
17+
# Catch-all target: route all unknown targets to Sphinx using the new
18+
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
19+
%: Makefile
20+
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

docs/conf.py

Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
# Configuration file for the Sphinx documentation builder.
2+
#
3+
# This file only contains a selection of the most common options. For a full
4+
# list see the documentation:
5+
# https://www.sphinx-doc.org/en/master/usage/configuration.html
6+
7+
# -- Path setup --------------------------------------------------------------
8+
9+
# If extensions (or modules to document with autodoc) are in another directory,
10+
# add these directories to sys.path here. If the directory is relative to the
11+
# documentation root, use os.path.abspath to make it absolute, like shown here.
12+
#
13+
# import os
14+
# import sys
15+
# sys.path.insert(0, os.path.abspath('.'))
16+
17+
18+
# -- Project information -----------------------------------------------------
19+
20+
project = 'firebird-driver'
21+
copyright = '2020, Pavel Císař'
22+
author = 'Pavel Císař'
23+
24+
# The short X.Y version
25+
version = '0.5.0'
26+
27+
# The full version, including alpha/beta/rc tags
28+
release = '0.5.0'
29+
30+
31+
# -- General configuration ---------------------------------------------------
32+
33+
# Add any Sphinx extension module names here, as strings. They can be
34+
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
35+
# ones.
36+
extensions = [
37+
'sphinx.ext.autodoc',
38+
'sphinx.ext.intersphinx',
39+
'sphinxcontrib.napoleon',
40+
'sphinx_autodoc_typehints',
41+
'sphinx.ext.todo',
42+
]
43+
44+
# Add any paths that contain templates here, relative to this directory.
45+
templates_path = ['_templates']
46+
47+
# The suffix(es) of source filenames.
48+
# You can specify multiple suffix as a list of string:
49+
#
50+
# source_suffix = ['.rst', '.md']
51+
source_suffix = '.txt'
52+
53+
# List of patterns, relative to source directory, that match files and
54+
# directories to ignore when looking for source files.
55+
# This pattern also affects html_static_path and html_extra_path.
56+
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']
57+
58+
59+
# -- Options for HTML output -------------------------------------------------
60+
61+
# The theme to use for HTML and HTML Help pages. See the documentation for
62+
# a list of builtin themes.
63+
#
64+
html_theme = 'alabaster'
65+
66+
# Add any paths that contain custom static files (such as style sheets) here,
67+
# relative to this directory. They are copied after the builtin static files,
68+
# so a file named "default.css" will overwrite the builtin "default.css".
69+
html_static_path = ['_static']
70+
71+
72+
# -- Extension configuration -------------------------------------------------
73+
74+
# -- Options for intersphinx extension ---------------------------------------
75+
76+
# Example configuration for intersphinx: refer to the Python standard library.
77+
intersphinx_mapping = {'https://docs.python.org/3/': None}
78+
79+
# -- Options for todo extension ----------------------------------------------
80+
81+
# If true, `todo` and `todoList` produce output, else they produce nothing.
82+
todo_include_todos = True

docs/index.txt

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
.. firebird-driver documentation master file, created by
2+
sphinx-quickstart on Thu Apr 30 18:01:07 2020.
3+
You can adapt this file completely to your liking, but it should at least
4+
contain the root `toctree` directive.
5+
6+
Welcome to firebird-driver's documentation!
7+
===========================================
8+
9+
.. toctree::
10+
:maxdepth: 2
11+
:caption: Contents:
12+
13+
14+
15+
Indices and tables
16+
==================
17+
18+
* :ref:`genindex`
19+
* :ref:`modindex`
20+
* :ref:`search`

docs/make.bat

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
@ECHO OFF
2+
3+
pushd %~dp0
4+
5+
REM Command file for Sphinx documentation
6+
7+
if "%SPHINXBUILD%" == "" (
8+
set SPHINXBUILD=sphinx-build
9+
)
10+
set SOURCEDIR=.
11+
set BUILDDIR=_build
12+
13+
if "%1" == "" goto help
14+
15+
%SPHINXBUILD% >NUL 2>NUL
16+
if errorlevel 9009 (
17+
echo.
18+
echo.The 'sphinx-build' command was not found. Make sure you have Sphinx
19+
echo.installed, then set the SPHINXBUILD environment variable to point
20+
echo.to the full path of the 'sphinx-build' executable. Alternatively you
21+
echo.may add the Sphinx directory to PATH.
22+
echo.
23+
echo.If you don't have Sphinx installed, grab it from
24+
echo.http://sphinx-doc.org/
25+
exit /b 1
26+
)
27+
28+
%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
29+
goto end
30+
31+
:help
32+
%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
33+
34+
:end
35+
popd

firebird/driver/__init__.py

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
#coding:utf-8
2+
#
3+
# PROGRAM/MODULE: firebird-driver
4+
# FILE: firebird/driver/__init__.py
5+
# DESCRIPTION: The Firebird driver for Python 3
6+
# CREATED: 4.3.2020
7+
#
8+
# The contents of this file are subject to the MIT License
9+
#
10+
# Permission is hereby granted, free of charge, to any person obtaining a copy
11+
# of this software and associated documentation files (the "Software"), to deal
12+
# in the Software without restriction, including without limitation the rights
13+
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
14+
# copies of the Software, and to permit persons to whom the Software is
15+
# furnished to do so, subject to the following conditions:
16+
#
17+
# The above copyright notice and this permission notice shall be included in all
18+
# copies or substantial portions of the Software.
19+
#
20+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
21+
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
22+
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
23+
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
24+
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
25+
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
26+
# SOFTWARE.
27+
#
28+
# Copyright (c) 2020 Firebird Project (www.firebirdsql.org)
29+
# All Rights Reserved.
30+
#
31+
# Contributor(s): Pavel Císař (original code)
32+
# ______________________________________
33+
34+
"""firebird-driver - The Firebird driver for Python 3
35+
36+
37+
"""
38+
39+
from .hooks import hooks, HookType
40+
from .fbapi import load_api, get_api
41+
from .core import connect, create_database, connect_service, transaction, \
42+
TPB, DPB, \
43+
ISOLATION_READ_COMMITED_LEGACY, ISOLATION_READ_COMMITED, \
44+
ISOLATION_REPEATABLE_READ, ISOLATION_SNAPSHOT, \
45+
ISOLATION_SERIALIZABLE, ISOLATION_SNAPSHOT_TABLE_STABILITY, \
46+
ISOLATION_READ_COMMITED_RO, \
47+
IMPLEMENTATION_NAMES, PROVIDER_NAMES, DB_CLASS_NAMES, \
48+
CHARSET_MAP
49+
from .types import Warning, Error, InterfaceError, DatabaseError, DataError, \
50+
OperationalError, IntegrityError, InternalError, ProgrammingError, \
51+
NotSupportedError, \
52+
NetProtocol, DBKeyScope, DbInfoCode, \
53+
TraInfoCode, TraInfoIsolation, TraInfoReadCommitted, \
54+
TraInfoAccess, Isolation, ReadCommitted, LockResolution, AccessMode, \
55+
TableShareMode, TableAccessMode, DefaultAction, StatementType, \
56+
PrpAccessMode, ShutdownMode, OnlineMode, ShutdownMethod, \
57+
ServerCapability, SvcRepairFlag, SvcStatFlag, SvcBackupFlag, \
58+
SvcRestoreFlag, SvcNBackupFlag, \
59+
apilevel, threadsafety, paramstyle, DESCRIPTION_NAME, DESCRIPTION_TYPE_CODE, \
60+
DESCRIPTION_DISPLAY_SIZE, DESCRIPTION_INTERNAL_SIZE, DESCRIPTION_PRECISION, \
61+
DESCRIPTION_SCALE, DESCRIPTION_NULL_OK, Date, Time, Timestamp, DateFromTicks, \
62+
TimeFromTicks, TimestampFromTicks, STRING, BINARY, NUMBER, DATETIME, ROWID
63+

0 commit comments

Comments
 (0)