python-arango-async 0.0.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- python_arango_async-0.0.1/.circleci/config.yml +101 -0
- python_arango_async-0.0.1/.github/workflows/codeql.yaml +23 -0
- python_arango_async-0.0.1/.github/workflows/docs.yaml +28 -0
- python_arango_async-0.0.1/.github/workflows/pypi.yaml +36 -0
- python_arango_async-0.0.1/.gitignore +160 -0
- python_arango_async-0.0.1/.pre-commit-config.yaml +41 -0
- python_arango_async-0.0.1/.readthedocs.yaml +25 -0
- python_arango_async-0.0.1/CONTRIBUTING.md +28 -0
- python_arango_async-0.0.1/LICENSE +21 -0
- python_arango_async-0.0.1/PKG-INFO +142 -0
- python_arango_async-0.0.1/README.md +79 -0
- python_arango_async-0.0.1/arangoasync/__init__.py +5 -0
- python_arango_async-0.0.1/arangoasync/aql.py +760 -0
- python_arango_async-0.0.1/arangoasync/auth.py +121 -0
- python_arango_async-0.0.1/arangoasync/client.py +239 -0
- python_arango_async-0.0.1/arangoasync/collection.py +1688 -0
- python_arango_async-0.0.1/arangoasync/compression.py +139 -0
- python_arango_async-0.0.1/arangoasync/connection.py +515 -0
- python_arango_async-0.0.1/arangoasync/cursor.py +262 -0
- python_arango_async-0.0.1/arangoasync/database.py +1533 -0
- python_arango_async-0.0.1/arangoasync/errno.py +1168 -0
- python_arango_async-0.0.1/arangoasync/exceptions.py +379 -0
- python_arango_async-0.0.1/arangoasync/executor.py +168 -0
- python_arango_async-0.0.1/arangoasync/http.py +182 -0
- python_arango_async-0.0.1/arangoasync/job.py +214 -0
- python_arango_async-0.0.1/arangoasync/logger.py +3 -0
- python_arango_async-0.0.1/arangoasync/request.py +107 -0
- python_arango_async-0.0.1/arangoasync/resolver.py +119 -0
- python_arango_async-0.0.1/arangoasync/response.py +65 -0
- python_arango_async-0.0.1/arangoasync/result.py +9 -0
- python_arango_async-0.0.1/arangoasync/serialization.py +111 -0
- python_arango_async-0.0.1/arangoasync/typings.py +1646 -0
- python_arango_async-0.0.1/arangoasync/version.py +1 -0
- python_arango_async-0.0.1/docs/aql.rst +10 -0
- python_arango_async-0.0.1/docs/async.rst +6 -0
- python_arango_async-0.0.1/docs/collection.rst +42 -0
- python_arango_async-0.0.1/docs/conf.py +33 -0
- python_arango_async-0.0.1/docs/database.rst +61 -0
- python_arango_async-0.0.1/docs/document.rst +131 -0
- python_arango_async-0.0.1/docs/errno.rst +19 -0
- python_arango_async-0.0.1/docs/errors.rst +20 -0
- python_arango_async-0.0.1/docs/index.rst +76 -0
- python_arango_async-0.0.1/docs/indexes.rst +51 -0
- python_arango_async-0.0.1/docs/overview.rst +40 -0
- python_arango_async-0.0.1/docs/specs.rst +56 -0
- python_arango_async-0.0.1/docs/static/logo.png +0 -0
- python_arango_async-0.0.1/docs/transaction.rst +5 -0
- python_arango_async-0.0.1/docs/user.rst +5 -0
- python_arango_async-0.0.1/pyproject.toml +95 -0
- python_arango_async-0.0.1/python_arango_async.egg-info/PKG-INFO +142 -0
- python_arango_async-0.0.1/python_arango_async.egg-info/SOURCES.txt +78 -0
- python_arango_async-0.0.1/python_arango_async.egg-info/dependency_links.txt +1 -0
- python_arango_async-0.0.1/python_arango_async.egg-info/requires.txt +18 -0
- python_arango_async-0.0.1/python_arango_async.egg-info/top_level.txt +1 -0
- python_arango_async-0.0.1/setup.cfg +10 -0
- python_arango_async-0.0.1/setup.py +3 -0
- python_arango_async-0.0.1/starter.sh +60 -0
- python_arango_async-0.0.1/tests/__init__.py +0 -0
- python_arango_async-0.0.1/tests/conftest.py +271 -0
- python_arango_async-0.0.1/tests/helpers.py +37 -0
- python_arango_async-0.0.1/tests/static/cluster-3.11.conf +14 -0
- python_arango_async-0.0.1/tests/static/cluster-3.12.conf +15 -0
- python_arango_async-0.0.1/tests/static/keyfile +1 -0
- python_arango_async-0.0.1/tests/static/single-3.11.conf +12 -0
- python_arango_async-0.0.1/tests/static/single-3.12.conf +13 -0
- python_arango_async-0.0.1/tests/test_aql.py +366 -0
- python_arango_async-0.0.1/tests/test_async.py +135 -0
- python_arango_async-0.0.1/tests/test_client.py +139 -0
- python_arango_async-0.0.1/tests/test_collection.py +184 -0
- python_arango_async-0.0.1/tests/test_compression.py +39 -0
- python_arango_async-0.0.1/tests/test_connection.py +261 -0
- python_arango_async-0.0.1/tests/test_cursor.py +414 -0
- python_arango_async-0.0.1/tests/test_database.py +210 -0
- python_arango_async-0.0.1/tests/test_document.py +568 -0
- python_arango_async-0.0.1/tests/test_http.py +55 -0
- python_arango_async-0.0.1/tests/test_resolver.py +56 -0
- python_arango_async-0.0.1/tests/test_transaction.py +224 -0
- python_arango_async-0.0.1/tests/test_typings.py +332 -0
- python_arango_async-0.0.1/tests/test_user.py +191 -0
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
version: 2.1
|
|
2
|
+
|
|
3
|
+
executors:
|
|
4
|
+
python-container:
|
|
5
|
+
docker:
|
|
6
|
+
- image: cimg/python:3.12
|
|
7
|
+
resource_class: small
|
|
8
|
+
python-vm:
|
|
9
|
+
machine:
|
|
10
|
+
image: ubuntu-2204:current
|
|
11
|
+
resource_class: medium
|
|
12
|
+
|
|
13
|
+
workflows:
|
|
14
|
+
ci:
|
|
15
|
+
jobs:
|
|
16
|
+
- lint
|
|
17
|
+
- test:
|
|
18
|
+
name: Python (<< matrix.python_version >>) - ArangoDB (<< matrix.arangodb_license >>, << matrix.arangodb_version >> << matrix.arangodb_config >>)
|
|
19
|
+
matrix:
|
|
20
|
+
parameters:
|
|
21
|
+
python_version: ["3.10", "3.11", "3.12"]
|
|
22
|
+
arangodb_config: ["single", "cluster"]
|
|
23
|
+
arangodb_license: ["community", "enterprise"]
|
|
24
|
+
arangodb_version: ["3.11", "3.12"]
|
|
25
|
+
|
|
26
|
+
jobs:
|
|
27
|
+
lint:
|
|
28
|
+
executor: python-container
|
|
29
|
+
resource_class: small
|
|
30
|
+
steps:
|
|
31
|
+
- checkout
|
|
32
|
+
- run:
|
|
33
|
+
name: Install Dependencies
|
|
34
|
+
command: pip install .[dev]
|
|
35
|
+
- run:
|
|
36
|
+
name: Run black
|
|
37
|
+
command: black --check --verbose --diff --color --config=pyproject.toml ./arangoasync ./tests/
|
|
38
|
+
- run:
|
|
39
|
+
name: Run flake8
|
|
40
|
+
command: flake8 ./arangoasync ./tests
|
|
41
|
+
- run:
|
|
42
|
+
name: Run isort
|
|
43
|
+
command: isort --check ./arangoasync ./tests
|
|
44
|
+
- run:
|
|
45
|
+
name: Run mypy
|
|
46
|
+
command: mypy ./arangoasync
|
|
47
|
+
test:
|
|
48
|
+
parameters:
|
|
49
|
+
python_version:
|
|
50
|
+
type: string
|
|
51
|
+
arangodb_config:
|
|
52
|
+
type: string
|
|
53
|
+
arangodb_license:
|
|
54
|
+
type: string
|
|
55
|
+
arangodb_version:
|
|
56
|
+
type: string
|
|
57
|
+
executor: python-vm
|
|
58
|
+
steps:
|
|
59
|
+
- checkout
|
|
60
|
+
- run:
|
|
61
|
+
name: Setup ArangoDB
|
|
62
|
+
command: |
|
|
63
|
+
chmod +x starter.sh
|
|
64
|
+
./starter.sh << parameters.arangodb_config >> << parameters.arangodb_license >> << parameters.arangodb_version >>
|
|
65
|
+
- restore_cache:
|
|
66
|
+
key: pip-and-local-cache
|
|
67
|
+
- run:
|
|
68
|
+
name: Setup Python
|
|
69
|
+
command: |
|
|
70
|
+
pyenv --version
|
|
71
|
+
pyenv install -f << parameters.python_version >>
|
|
72
|
+
pyenv global << parameters.python_version >>
|
|
73
|
+
- run:
|
|
74
|
+
name: Install Dependencies
|
|
75
|
+
command: pip install -e .[dev]
|
|
76
|
+
- run: docker ps -a
|
|
77
|
+
- run: docker logs arango
|
|
78
|
+
- run:
|
|
79
|
+
name: Run pytest
|
|
80
|
+
command: |
|
|
81
|
+
mkdir test-results
|
|
82
|
+
mkdir htmlcov
|
|
83
|
+
|
|
84
|
+
args=("--junitxml=test-results/junit.xml" "--log-cli-level=DEBUG" "--host" "localhost" "--port=8529")
|
|
85
|
+
if [ << parameters.arangodb_config >> = "cluster" ]; then
|
|
86
|
+
args+=("--cluster" "--port=8539" "--port=8549")
|
|
87
|
+
fi
|
|
88
|
+
|
|
89
|
+
if [ << parameters.arangodb_license >> = "enterprise" ]; then
|
|
90
|
+
args+=("--enterprise")
|
|
91
|
+
fi
|
|
92
|
+
|
|
93
|
+
echo "Running pytest with args: ${args[@]}"
|
|
94
|
+
pytest --cov=arangoasync --cov-report=html:htmlcov --color=yes --code-highlight=yes "${args[@]}"
|
|
95
|
+
- store_artifacts:
|
|
96
|
+
path: htmlcov
|
|
97
|
+
destination: coverage-report
|
|
98
|
+
- store_artifacts:
|
|
99
|
+
path: test-results
|
|
100
|
+
- store_test_results:
|
|
101
|
+
path: test-results
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
name: CodeQL
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
pull_request:
|
|
5
|
+
branches: [main]
|
|
6
|
+
|
|
7
|
+
jobs:
|
|
8
|
+
analyze:
|
|
9
|
+
name: Analyze
|
|
10
|
+
runs-on: ubuntu-latest
|
|
11
|
+
|
|
12
|
+
permissions:
|
|
13
|
+
security-events: write
|
|
14
|
+
|
|
15
|
+
steps:
|
|
16
|
+
- name: Checkout repository
|
|
17
|
+
uses: actions/checkout@v3
|
|
18
|
+
|
|
19
|
+
- name: Initialize CodeQL
|
|
20
|
+
uses: github/codeql-action/init@v2
|
|
21
|
+
|
|
22
|
+
- name: Perform CodeQL Analysis
|
|
23
|
+
uses: github/codeql-action/analyze@v2
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
name: Docs
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
pull_request:
|
|
5
|
+
workflow_dispatch:
|
|
6
|
+
|
|
7
|
+
jobs:
|
|
8
|
+
docs:
|
|
9
|
+
runs-on: ubuntu-latest
|
|
10
|
+
name: Docs
|
|
11
|
+
|
|
12
|
+
steps:
|
|
13
|
+
- name: Checkout repository
|
|
14
|
+
uses: actions/checkout@v4
|
|
15
|
+
|
|
16
|
+
- name: Fetch all tags and branches
|
|
17
|
+
run: git fetch --prune --unshallow
|
|
18
|
+
|
|
19
|
+
- name: Set up Python
|
|
20
|
+
uses: actions/setup-python@v4
|
|
21
|
+
with:
|
|
22
|
+
python-version: '3.12'
|
|
23
|
+
|
|
24
|
+
- name: Install dependencies
|
|
25
|
+
run: pip install .[dev]
|
|
26
|
+
|
|
27
|
+
- name: Run Sphinx doctest
|
|
28
|
+
run: python -m sphinx -b doctest docs docs/_build
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
name: Upload to PyPI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
release:
|
|
5
|
+
types: [published]
|
|
6
|
+
|
|
7
|
+
jobs:
|
|
8
|
+
upload:
|
|
9
|
+
runs-on: ubuntu-latest
|
|
10
|
+
|
|
11
|
+
steps:
|
|
12
|
+
- uses: actions/checkout@v3
|
|
13
|
+
|
|
14
|
+
- uses: actions/setup-python@v4
|
|
15
|
+
with:
|
|
16
|
+
python-version: "3.12"
|
|
17
|
+
|
|
18
|
+
- name: Install build dependencies
|
|
19
|
+
run: |
|
|
20
|
+
python -m pip install --upgrade pip
|
|
21
|
+
pip install build twine
|
|
22
|
+
|
|
23
|
+
- name: Build package
|
|
24
|
+
run: python -m build
|
|
25
|
+
|
|
26
|
+
- name: Publish to PyPI Test
|
|
27
|
+
env:
|
|
28
|
+
TWINE_USERNAME: __token__
|
|
29
|
+
TWINE_PASSWORD: ${{ secrets.PYPI_TEST_TOKEN }}
|
|
30
|
+
run: twine upload --repository testpypi dist/*
|
|
31
|
+
|
|
32
|
+
- name: Publish to PyPI
|
|
33
|
+
env:
|
|
34
|
+
TWINE_USERNAME: __token__
|
|
35
|
+
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
|
|
36
|
+
run: twine upload --repository pypi dist/*
|
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
# Byte-compiled / optimized / DLL files
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[cod]
|
|
4
|
+
*$py.class
|
|
5
|
+
|
|
6
|
+
# C extensions
|
|
7
|
+
*.so
|
|
8
|
+
|
|
9
|
+
# Distribution / packaging
|
|
10
|
+
.Python
|
|
11
|
+
build/
|
|
12
|
+
develop-eggs/
|
|
13
|
+
dist/
|
|
14
|
+
downloads/
|
|
15
|
+
eggs/
|
|
16
|
+
.eggs/
|
|
17
|
+
lib/
|
|
18
|
+
lib64/
|
|
19
|
+
parts/
|
|
20
|
+
sdist/
|
|
21
|
+
var/
|
|
22
|
+
wheels/
|
|
23
|
+
share/python-wheels/
|
|
24
|
+
*.egg-info/
|
|
25
|
+
.installed.cfg
|
|
26
|
+
*.egg
|
|
27
|
+
MANIFEST
|
|
28
|
+
|
|
29
|
+
# PyInstaller
|
|
30
|
+
# Usually these files are written by a python script from a template
|
|
31
|
+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
|
|
32
|
+
*.manifest
|
|
33
|
+
*.spec
|
|
34
|
+
|
|
35
|
+
# Installer logs
|
|
36
|
+
pip-log.txt
|
|
37
|
+
pip-delete-this-directory.txt
|
|
38
|
+
|
|
39
|
+
# Unit test / coverage reports
|
|
40
|
+
htmlcov/
|
|
41
|
+
.tox/
|
|
42
|
+
.nox/
|
|
43
|
+
.coverage
|
|
44
|
+
.coverage.*
|
|
45
|
+
.cache
|
|
46
|
+
nosetests.xml
|
|
47
|
+
coverage.xml
|
|
48
|
+
*.cover
|
|
49
|
+
*.py,cover
|
|
50
|
+
.hypothesis/
|
|
51
|
+
.pytest_cache/
|
|
52
|
+
cover/
|
|
53
|
+
|
|
54
|
+
# Translations
|
|
55
|
+
*.mo
|
|
56
|
+
*.pot
|
|
57
|
+
|
|
58
|
+
# Django stuff:
|
|
59
|
+
*.log
|
|
60
|
+
local_settings.py
|
|
61
|
+
db.sqlite3
|
|
62
|
+
db.sqlite3-journal
|
|
63
|
+
|
|
64
|
+
# Flask stuff:
|
|
65
|
+
instance/
|
|
66
|
+
.webassets-cache
|
|
67
|
+
|
|
68
|
+
# Scrapy stuff:
|
|
69
|
+
.scrapy
|
|
70
|
+
|
|
71
|
+
# Sphinx documentation
|
|
72
|
+
docs/_build/
|
|
73
|
+
|
|
74
|
+
# PyBuilder
|
|
75
|
+
.pybuilder/
|
|
76
|
+
target/
|
|
77
|
+
|
|
78
|
+
# Jupyter Notebook
|
|
79
|
+
.ipynb_checkpoints
|
|
80
|
+
|
|
81
|
+
# IPython
|
|
82
|
+
profile_default/
|
|
83
|
+
ipython_config.py
|
|
84
|
+
|
|
85
|
+
# pyenv
|
|
86
|
+
# For a library or package, you might want to ignore these files since the code is
|
|
87
|
+
# intended to run in multiple environments; otherwise, check them in:
|
|
88
|
+
# .python-version
|
|
89
|
+
|
|
90
|
+
# pipenv
|
|
91
|
+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
|
|
92
|
+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
|
|
93
|
+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
|
|
94
|
+
# install all needed dependencies.
|
|
95
|
+
#Pipfile.lock
|
|
96
|
+
|
|
97
|
+
# poetry
|
|
98
|
+
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
|
|
99
|
+
# This is especially recommended for binary packages to ensure reproducibility, and is more
|
|
100
|
+
# commonly ignored for libraries.
|
|
101
|
+
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
|
|
102
|
+
#poetry.lock
|
|
103
|
+
|
|
104
|
+
# pdm
|
|
105
|
+
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
|
|
106
|
+
#pdm.lock
|
|
107
|
+
# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
|
|
108
|
+
# in version control.
|
|
109
|
+
# https://pdm.fming.dev/#use-with-ide
|
|
110
|
+
.pdm.toml
|
|
111
|
+
|
|
112
|
+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
|
|
113
|
+
__pypackages__/
|
|
114
|
+
|
|
115
|
+
# Celery stuff
|
|
116
|
+
celerybeat-schedule
|
|
117
|
+
celerybeat.pid
|
|
118
|
+
|
|
119
|
+
# SageMath parsed files
|
|
120
|
+
*.sage.py
|
|
121
|
+
|
|
122
|
+
# Environments
|
|
123
|
+
.env
|
|
124
|
+
.venv
|
|
125
|
+
env/
|
|
126
|
+
venv/
|
|
127
|
+
ENV/
|
|
128
|
+
env.bak/
|
|
129
|
+
venv.bak/
|
|
130
|
+
|
|
131
|
+
# Spyder project settings
|
|
132
|
+
.spyderproject
|
|
133
|
+
.spyproject
|
|
134
|
+
|
|
135
|
+
# Rope project settings
|
|
136
|
+
.ropeproject
|
|
137
|
+
|
|
138
|
+
# mkdocs documentation
|
|
139
|
+
/site
|
|
140
|
+
|
|
141
|
+
# mypy
|
|
142
|
+
.mypy_cache/
|
|
143
|
+
.dmypy.json
|
|
144
|
+
dmypy.json
|
|
145
|
+
|
|
146
|
+
# Pyre type checker
|
|
147
|
+
.pyre/
|
|
148
|
+
|
|
149
|
+
# pytype static type analyzer
|
|
150
|
+
.pytype/
|
|
151
|
+
|
|
152
|
+
# Cython debug symbols
|
|
153
|
+
cython_debug/
|
|
154
|
+
|
|
155
|
+
# PyCharm
|
|
156
|
+
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
|
|
157
|
+
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
|
|
158
|
+
# and can be added to the global gitignore or merged into this file. For a more nuclear
|
|
159
|
+
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
|
|
160
|
+
.idea/
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
repos:
|
|
2
|
+
- repo: https://github.com/pre-commit/pre-commit-hooks
|
|
3
|
+
rev: v4.4.0
|
|
4
|
+
# See https://pre-commit.com/hooks.html
|
|
5
|
+
hooks:
|
|
6
|
+
- id: check-case-conflict
|
|
7
|
+
- id: check-executables-have-shebangs
|
|
8
|
+
- id: check-merge-conflict
|
|
9
|
+
- id: check-symlinks
|
|
10
|
+
- id: check-toml
|
|
11
|
+
- id: check-xml
|
|
12
|
+
- id: check-yaml
|
|
13
|
+
- id: debug-statements
|
|
14
|
+
- id: detect-private-key
|
|
15
|
+
- id: end-of-file-fixer
|
|
16
|
+
- id: mixed-line-ending
|
|
17
|
+
- id: pretty-format-json
|
|
18
|
+
- id: trailing-whitespace
|
|
19
|
+
|
|
20
|
+
- repo: https://github.com/psf/black
|
|
21
|
+
rev: 24.4.2
|
|
22
|
+
hooks:
|
|
23
|
+
- id: black
|
|
24
|
+
|
|
25
|
+
- repo: https://github.com/PyCQA/isort
|
|
26
|
+
rev: 5.12.0
|
|
27
|
+
hooks:
|
|
28
|
+
- id: isort
|
|
29
|
+
args: [ --profile, black ]
|
|
30
|
+
|
|
31
|
+
- repo: https://github.com/PyCQA/flake8
|
|
32
|
+
rev: 7.0.0
|
|
33
|
+
hooks:
|
|
34
|
+
- id: flake8
|
|
35
|
+
|
|
36
|
+
- repo: https://github.com/pre-commit/mirrors-mypy
|
|
37
|
+
rev: v1.10.0
|
|
38
|
+
hooks:
|
|
39
|
+
- id: mypy
|
|
40
|
+
files: ^arangoasync/
|
|
41
|
+
additional_dependencies: ["types-requests", "types-setuptools"]
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# .readthedocs.yaml
|
|
2
|
+
# Read the Docs configuration file
|
|
3
|
+
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
|
|
4
|
+
|
|
5
|
+
# Required
|
|
6
|
+
version: 2
|
|
7
|
+
|
|
8
|
+
# Set the OS, Python version and other tools you might need
|
|
9
|
+
build:
|
|
10
|
+
os: ubuntu-22.04
|
|
11
|
+
tools:
|
|
12
|
+
python: "3.12"
|
|
13
|
+
|
|
14
|
+
# Build documentation in the "docs/" directory with Sphinx
|
|
15
|
+
sphinx:
|
|
16
|
+
configuration: docs/conf.py
|
|
17
|
+
fail_on_warning: true
|
|
18
|
+
|
|
19
|
+
# Optional but recommended, declare the Python requirements required
|
|
20
|
+
# to build your documentation
|
|
21
|
+
# See https://docs.readthedocs.io/en/stable/guides/reproducible-builds.html
|
|
22
|
+
python:
|
|
23
|
+
install:
|
|
24
|
+
- method: pip
|
|
25
|
+
path: .[dev]
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# Contributing
|
|
2
|
+
|
|
3
|
+
Set up dev environment:
|
|
4
|
+
```shell
|
|
5
|
+
cd ~/your/repository/fork # Activate venv if you have one (recommended)
|
|
6
|
+
pip install -e .[dev] # Install dev dependencies (e.g. black, mypy, pre-commit)
|
|
7
|
+
pre-commit install # Install git pre-commit hooks
|
|
8
|
+
```
|
|
9
|
+
|
|
10
|
+
Run unit tests with coverage:
|
|
11
|
+
|
|
12
|
+
```shell
|
|
13
|
+
pytest --cov=arango --cov-report=html # Open htmlcov/index.html in your browser
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
To start and ArangoDB instance locally, run:
|
|
17
|
+
|
|
18
|
+
```shell
|
|
19
|
+
./starter.sh # Requires docker
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
Build and test documentation:
|
|
23
|
+
|
|
24
|
+
```shell
|
|
25
|
+
python -m sphinx docs docs/_build # Open docs/_build/index.html in your browser
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
Thank you for your contribution!
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2024 ArangoDB
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: python-arango-async
|
|
3
|
+
Version: 0.0.1
|
|
4
|
+
Summary: Async Python Driver for ArangoDB
|
|
5
|
+
Author-email: Alexandru Petenchea <alexandru.petenchea@arangodb.com>, Anthony Mahanna <anthony.mahanna@arangodb.com>
|
|
6
|
+
Maintainer-email: Alexandru Petenchea <alexandru.petenchea@arangodb.com>, Anthony Mahanna <anthony.mahanna@arangodb.com>
|
|
7
|
+
License: MIT License
|
|
8
|
+
|
|
9
|
+
Copyright (c) 2024 ArangoDB
|
|
10
|
+
|
|
11
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
12
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
13
|
+
in the Software without restriction, including without limitation the rights
|
|
14
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
15
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
16
|
+
furnished to do so, subject to the following conditions:
|
|
17
|
+
|
|
18
|
+
The above copyright notice and this permission notice shall be included in all
|
|
19
|
+
copies or substantial portions of the Software.
|
|
20
|
+
|
|
21
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
22
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
23
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
24
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
25
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
26
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
27
|
+
SOFTWARE.
|
|
28
|
+
|
|
29
|
+
Project-URL: homepage, https://github.com/arangodb/python-arango-async
|
|
30
|
+
Keywords: arangodb,python,driver,async
|
|
31
|
+
Classifier: Intended Audience :: Developers
|
|
32
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
33
|
+
Classifier: Natural Language :: English
|
|
34
|
+
Classifier: Operating System :: OS Independent
|
|
35
|
+
Classifier: Programming Language :: Python :: 3
|
|
36
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
37
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
38
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
39
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
40
|
+
Classifier: Topic :: Documentation :: Sphinx
|
|
41
|
+
Classifier: Typing :: Typed
|
|
42
|
+
Requires-Python: >=3.9
|
|
43
|
+
Description-Content-Type: text/markdown
|
|
44
|
+
License-File: LICENSE
|
|
45
|
+
Requires-Dist: packaging>=23.1
|
|
46
|
+
Requires-Dist: setuptools>=42
|
|
47
|
+
Requires-Dist: aiohttp>=3.9
|
|
48
|
+
Requires-Dist: multidict>=6.0
|
|
49
|
+
Requires-Dist: pyjwt>=2.8.0
|
|
50
|
+
Provides-Extra: dev
|
|
51
|
+
Requires-Dist: black>=24.2; extra == "dev"
|
|
52
|
+
Requires-Dist: flake8>=7.0; extra == "dev"
|
|
53
|
+
Requires-Dist: isort>=5.10; extra == "dev"
|
|
54
|
+
Requires-Dist: mypy>=1.10; extra == "dev"
|
|
55
|
+
Requires-Dist: pre-commit>=3.7; extra == "dev"
|
|
56
|
+
Requires-Dist: pytest>=8.2; extra == "dev"
|
|
57
|
+
Requires-Dist: pytest-asyncio>=0.23.8; extra == "dev"
|
|
58
|
+
Requires-Dist: pytest-cov>=5.0; extra == "dev"
|
|
59
|
+
Requires-Dist: sphinx>=7.3; extra == "dev"
|
|
60
|
+
Requires-Dist: sphinx_rtd_theme>=2.0; extra == "dev"
|
|
61
|
+
Requires-Dist: types-setuptools; extra == "dev"
|
|
62
|
+
Dynamic: license-file
|
|
63
|
+
|
|
64
|
+

|
|
65
|
+
|
|
66
|
+
[](https://dl.circleci.com/status-badge/redirect/gh/arangodb/python-arango-async/tree/main)
|
|
67
|
+
[](https://github.com/arangodb/python-arango-async/actions/workflows/codeql.yaml)
|
|
68
|
+
[](https://github.com/arangodb/python-arango-async/commits/main)
|
|
69
|
+
|
|
70
|
+
[](https://pypi.org/project/python-arango-async/)
|
|
71
|
+
[](https://pypi.org/project/python-arango-async/)
|
|
72
|
+
|
|
73
|
+
[](https://github.com/arangodb/python-arango/blob/main/LICENSE)
|
|
74
|
+
[](https://github.com/psf/black)
|
|
75
|
+
[](https://pepy.tech/project/python-arango-async)
|
|
77
|
+
|
|
78
|
+
# python-arango-async
|
|
79
|
+
|
|
80
|
+
Python driver for [ArangoDB](https://www.arangodb.com), a scalable multi-model
|
|
81
|
+
database natively supporting documents, graphs and search.
|
|
82
|
+
|
|
83
|
+
This is the _asyncio_ alternative of the officially supported [python-arango](https://github.com/arangodb/python-arango)
|
|
84
|
+
driver.
|
|
85
|
+
|
|
86
|
+
**Note: This project is still in active development, features might be added or removed.**
|
|
87
|
+
|
|
88
|
+
## Requirements
|
|
89
|
+
|
|
90
|
+
- ArangoDB version 3.11+
|
|
91
|
+
- Python version 3.9+
|
|
92
|
+
|
|
93
|
+
## Installation
|
|
94
|
+
|
|
95
|
+
```shell
|
|
96
|
+
pip install python-arango-async --upgrade
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
## Getting Started
|
|
100
|
+
|
|
101
|
+
Here is a simple usage example:
|
|
102
|
+
|
|
103
|
+
```python
|
|
104
|
+
from arangoasync import ArangoClient
|
|
105
|
+
from arangoasync.auth import Auth
|
|
106
|
+
|
|
107
|
+
|
|
108
|
+
async def main():
|
|
109
|
+
# Initialize the client for ArangoDB.
|
|
110
|
+
async with ArangoClient(hosts="http://localhost:8529") as client:
|
|
111
|
+
auth = Auth(username="root", password="passwd")
|
|
112
|
+
|
|
113
|
+
# Connect to "_system" database as root user.
|
|
114
|
+
sys_db = await client.db("_system", auth=auth)
|
|
115
|
+
|
|
116
|
+
# Create a new database named "test".
|
|
117
|
+
await sys_db.create_database("test")
|
|
118
|
+
|
|
119
|
+
# Connect to "test" database as root user.
|
|
120
|
+
db = await client.db("test", auth=auth)
|
|
121
|
+
|
|
122
|
+
# Create a new collection named "students".
|
|
123
|
+
students = await db.create_collection("students")
|
|
124
|
+
|
|
125
|
+
# Add a persistent index to the collection.
|
|
126
|
+
await students.add_index(type="persistent", fields=["name"], options={"unique": True})
|
|
127
|
+
|
|
128
|
+
# Insert new documents into the collection.
|
|
129
|
+
await students.insert({"name": "jane", "age": 39})
|
|
130
|
+
await students.insert({"name": "josh", "age": 18})
|
|
131
|
+
await students.insert({"name": "judy", "age": 21})
|
|
132
|
+
|
|
133
|
+
# Execute an AQL query and iterate through the result cursor.
|
|
134
|
+
cursor = await db.aql.execute("FOR doc IN students RETURN doc")
|
|
135
|
+
async with cursor:
|
|
136
|
+
student_names = []
|
|
137
|
+
async for doc in cursor:
|
|
138
|
+
student_names.append(doc["name"])
|
|
139
|
+
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
Please see the [documentation](https://python-arango-async.readthedocs.io/en/latest/) for more details.
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+

|
|
2
|
+
|
|
3
|
+
[](https://dl.circleci.com/status-badge/redirect/gh/arangodb/python-arango-async/tree/main)
|
|
4
|
+
[](https://github.com/arangodb/python-arango-async/actions/workflows/codeql.yaml)
|
|
5
|
+
[](https://github.com/arangodb/python-arango-async/commits/main)
|
|
6
|
+
|
|
7
|
+
[](https://pypi.org/project/python-arango-async/)
|
|
8
|
+
[](https://pypi.org/project/python-arango-async/)
|
|
9
|
+
|
|
10
|
+
[](https://github.com/arangodb/python-arango/blob/main/LICENSE)
|
|
11
|
+
[](https://github.com/psf/black)
|
|
12
|
+
[](https://pepy.tech/project/python-arango-async)
|
|
14
|
+
|
|
15
|
+
# python-arango-async
|
|
16
|
+
|
|
17
|
+
Python driver for [ArangoDB](https://www.arangodb.com), a scalable multi-model
|
|
18
|
+
database natively supporting documents, graphs and search.
|
|
19
|
+
|
|
20
|
+
This is the _asyncio_ alternative of the officially supported [python-arango](https://github.com/arangodb/python-arango)
|
|
21
|
+
driver.
|
|
22
|
+
|
|
23
|
+
**Note: This project is still in active development, features might be added or removed.**
|
|
24
|
+
|
|
25
|
+
## Requirements
|
|
26
|
+
|
|
27
|
+
- ArangoDB version 3.11+
|
|
28
|
+
- Python version 3.9+
|
|
29
|
+
|
|
30
|
+
## Installation
|
|
31
|
+
|
|
32
|
+
```shell
|
|
33
|
+
pip install python-arango-async --upgrade
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
## Getting Started
|
|
37
|
+
|
|
38
|
+
Here is a simple usage example:
|
|
39
|
+
|
|
40
|
+
```python
|
|
41
|
+
from arangoasync import ArangoClient
|
|
42
|
+
from arangoasync.auth import Auth
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
async def main():
|
|
46
|
+
# Initialize the client for ArangoDB.
|
|
47
|
+
async with ArangoClient(hosts="http://localhost:8529") as client:
|
|
48
|
+
auth = Auth(username="root", password="passwd")
|
|
49
|
+
|
|
50
|
+
# Connect to "_system" database as root user.
|
|
51
|
+
sys_db = await client.db("_system", auth=auth)
|
|
52
|
+
|
|
53
|
+
# Create a new database named "test".
|
|
54
|
+
await sys_db.create_database("test")
|
|
55
|
+
|
|
56
|
+
# Connect to "test" database as root user.
|
|
57
|
+
db = await client.db("test", auth=auth)
|
|
58
|
+
|
|
59
|
+
# Create a new collection named "students".
|
|
60
|
+
students = await db.create_collection("students")
|
|
61
|
+
|
|
62
|
+
# Add a persistent index to the collection.
|
|
63
|
+
await students.add_index(type="persistent", fields=["name"], options={"unique": True})
|
|
64
|
+
|
|
65
|
+
# Insert new documents into the collection.
|
|
66
|
+
await students.insert({"name": "jane", "age": 39})
|
|
67
|
+
await students.insert({"name": "josh", "age": 18})
|
|
68
|
+
await students.insert({"name": "judy", "age": 21})
|
|
69
|
+
|
|
70
|
+
# Execute an AQL query and iterate through the result cursor.
|
|
71
|
+
cursor = await db.aql.execute("FOR doc IN students RETURN doc")
|
|
72
|
+
async with cursor:
|
|
73
|
+
student_names = []
|
|
74
|
+
async for doc in cursor:
|
|
75
|
+
student_names.append(doc["name"])
|
|
76
|
+
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
Please see the [documentation](https://python-arango-async.readthedocs.io/en/latest/) for more details.
|