Skip to content

Commit 4c93f7e

Browse files
committed
readme added
1 parent d1d667e commit 4c93f7e

File tree

6 files changed

+69
-5
lines changed

6 files changed

+69
-5
lines changed

README.md

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
django-iris
2+
===
3+
4+
InterSystems IRIS backend for [Django](https://www.djangoproject.com/)
5+
6+
Prerequisites
7+
---
8+
9+
You must install, the latest version of InterSystems IRIS DB-API Python driver
10+
11+
```shell
12+
pip3 install intersystems_irispython-3.2.0-py3-none-any.whl
13+
```
14+
15+
Install and usage
16+
---
17+
18+
Install with pip
19+
20+
`pip install django-iris`
21+
22+
Configure the Django `DATABASES` setting similar to this:
23+
24+
```python
25+
DATABASES = {
26+
'default': {
27+
'ENGINE': 'django_iris',
28+
'NAME': 'USER',
29+
'USER': '_SYSTEM',
30+
'PASSWORD': 'SYS',
31+
'HOST': 'localhost',
32+
'PORT': '1972',
33+
},
34+
}
35+
```

django_iris/cursor.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,12 @@ def _fix_for_params(self, query, params):
2020
def execute(self, query, params=None):
2121
self.times = 0
2222
query, params = self._fix_for_params(query, params)
23-
# print(query, params)
24-
self.cursor.execute(query, params)
23+
return self.cursor.execute(query, params)
2524

2625
def executemany(self, query, params=None):
2726
self.times = 0
2827
query, params = self._fix_for_params(query, params)
29-
# print(query, params)
30-
self.cursor.executemany(query, params)
28+
return self.cursor.executemany(query, params)
3129

3230
def close(self):
3331
try:
@@ -57,4 +55,5 @@ def fetchmany(self, size=None):
5755
return rows
5856

5957
def fetchone(self):
60-
return tuple(self.cursor.fetchone())
58+
row = self.cursor.fetchone()
59+
return tuple(row) if row else None
102 KB
Binary file not shown.

requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
intersystems_irispython

setup.cfg

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
[metadata]
2+
name = django-iris
3+
version = 0.1.0
4+
url = https://github.com/caretdev/django-iris
5+
maintainer = CaretDev
6+
maintainer_email = [email protected]
7+
license = MIT
8+
description = Django backend for InterSystems IRIS
9+
long_description = file: README.md
10+
long_description_content_type = text/markdown
11+
classifiers =
12+
Development Status :: 5 - Production/Stable
13+
Framework :: Django
14+
Framework :: Django :: 4.0
15+
License :: OSI Approved :: MIT License
16+
Operating System :: OS Independent
17+
Programming Language :: Python
18+
Programming Language :: Python :: 3
19+
Programming Language :: Python :: 3.9
20+
Programming Language :: Python :: 3.10
21+
project_urls =
22+
Source = https://github.com/caretdev/django-iris
23+
Tracker = https://github.com/caretdev/django-iris/issues
24+
25+
[options]
26+
python_requires = >=3.9

setup.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
from setuptools import setup
2+
3+
setup()

0 commit comments

Comments
 (0)