summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore1
-rw-r--r--python-django-cassandra-engine.spec398
-rw-r--r--sources1
3 files changed, 400 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
index e69de29..99d2c91 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/django_cassandra_engine-1.8.0.tar.gz
diff --git a/python-django-cassandra-engine.spec b/python-django-cassandra-engine.spec
new file mode 100644
index 0000000..4b471df
--- /dev/null
+++ b/python-django-cassandra-engine.spec
@@ -0,0 +1,398 @@
+%global _empty_manifest_terminate_build 0
+Name: python-django-cassandra-engine
+Version: 1.8.0
+Release: 1
+Summary: Django Cassandra Engine
+License: 2-clause BSD
+URL: https://github.com/r4fek/django-cassandra-engine
+Source0: https://mirrors.nju.edu.cn/pypi/web/packages/f3/6d/2ab949e2cf5fccf9c8875b16b8f9296d6b08926ca4a4b7e98e45d2fdbf55/django_cassandra_engine-1.8.0.tar.gz
+BuildArch: noarch
+
+Requires: python3-django
+Requires: python3-scylla-driver
+
+%description
+
+# Django Cassandra Engine - the Cassandra backend for Django #
+
+All tools you need to start your journey with Apache Cassandra and Django Framework!
+
+[![Latest version](https://img.shields.io/pypi/v/django-cassandra-engine.svg "Latest version")](https://pypi.python.org/pypi/django-cassandra-engine/)
+![workflow](https://github.com/r4fek/django-cassandra-engine/actions/workflows/tox.yml/badge.svg)
+
+Discord: https://discord.gg/pxunMGmDNc
+## Features ##
+
+* integration with latest `python-driver` and optionally `dse-driver` from DataStax
+* working `flush`, `migrate`, `sync_cassandra`, `inspectdb` and
+ `dbshell` commands
+* support for creating/destroying test database
+* accepts all `Cqlengine` and `cassandra.cluster.Cluster` connection options
+* automatic connection/disconnection handling
+* works well along with relational databases (as secondary DB)
+* storing sessions in Cassandra
+* working django forms
+* usable admin panel with Cassandra models
+* support DataStax Astra cloud hosted Cassandra
+
+## Sponsors ##
+Help support ongoing development and maintenance by [sponsoring Django Cassandra Engine](https://github.com/sponsors/r4fek).
+
+### Our Sponsors: ###
+<table><tr>
+<td align="center" width="300" ><a href="https://astra.dev/3xPljcu"><img src="https://www.datastax.com/sites/default/files/2021-07/astra-negative-square.png" width="90" height="90" alt="Astra DB" /><br />Astra DB</a><br/>Use Django with DataStax Astra DB - built on Apache Cassandra.</td>
+<td align="center" width="300" ><a href="https://github.com/NoiSek"><img src="https://avatars.githubusercontent.com/u/631328?v=4" width="90" height="90" alt="NoiSek" /><br/>NoiSek</a></td>
+</tr></table>
+
+
+## Installation ##
+
+Recommended installation:
+
+ pip install django-cassandra-engine
+
+## Basic Usage ##
+
+1. Add `django_cassandra_engine` to `INSTALLED_APPS` in your `settings.py` file:
+
+ INSTALLED_APPS = ('django_cassandra_engine',) + INSTALLED_APPS
+
+2. Change `DATABASES` setting:
+
+ DATABASES = {
+ 'default': {
+ 'ENGINE': 'django_cassandra_engine',
+ 'NAME': 'db',
+ 'TEST_NAME': 'test_db',
+ 'HOST': 'db1.example.com,db2.example.com',
+ 'OPTIONS': {
+ 'replication': {
+ 'strategy_class': 'SimpleStrategy',
+ 'replication_factor': 1
+ }
+ }
+ }
+ }
+
+3. Define some model:
+
+ # myapp/models.py
+
+ import uuid
+ from cassandra.cqlengine import columns
+ from django_cassandra_engine.models import DjangoCassandraModel
+
+ class ExampleModel(DjangoCassandraModel):
+ example_id = columns.UUID(primary_key=True, default=uuid.uuid4)
+ example_type = columns.Integer(index=True)
+ created_at = columns.DateTime()
+ description = columns.Text(required=False)
+
+4. Run `./manage.py sync_cassandra`
+5. Done!
+
+## Connect to Cassandra with a Cloud Config bundle ##
+To connect to a hosted Cassandra cluster that provides a secure connection bundle (ex. DataStax Astra) change the `DATABASES` setting of your settings.py:
+
+ DATABASES = {
+ 'default': {
+ 'ENGINE': 'django_cassandra_engine',
+ 'NAME': 'keyspace_name',
+ 'TEST_NAME': 'table_name',
+ 'USER': 'token',
+ 'PASSWORD': token_value,
+ 'OPTIONS': {
+ 'connection': {
+ 'cloud': {
+ 'secure_connect_bundle': '/path/to/secure/bundle.zip'
+ },
+ }
+ }
+ }
+ }
+
+## Documentation ##
+
+The documentation can be found online [here](http://r4fek.github.io/django-cassandra-engine/).
+
+## License ##
+Copyright (c) 2014-2023, [Rafał Furmański](https://linkedin.com/in/furmanski).
+
+All rights reserved. Licensed under BSD 2-Clause License.
+
+
+
+%package -n python3-django-cassandra-engine
+Summary: Django Cassandra Engine
+Provides: python-django-cassandra-engine
+BuildRequires: python3-devel
+BuildRequires: python3-setuptools
+BuildRequires: python3-pip
+%description -n python3-django-cassandra-engine
+
+# Django Cassandra Engine - the Cassandra backend for Django #
+
+All tools you need to start your journey with Apache Cassandra and Django Framework!
+
+[![Latest version](https://img.shields.io/pypi/v/django-cassandra-engine.svg "Latest version")](https://pypi.python.org/pypi/django-cassandra-engine/)
+![workflow](https://github.com/r4fek/django-cassandra-engine/actions/workflows/tox.yml/badge.svg)
+
+Discord: https://discord.gg/pxunMGmDNc
+## Features ##
+
+* integration with latest `python-driver` and optionally `dse-driver` from DataStax
+* working `flush`, `migrate`, `sync_cassandra`, `inspectdb` and
+ `dbshell` commands
+* support for creating/destroying test database
+* accepts all `Cqlengine` and `cassandra.cluster.Cluster` connection options
+* automatic connection/disconnection handling
+* works well along with relational databases (as secondary DB)
+* storing sessions in Cassandra
+* working django forms
+* usable admin panel with Cassandra models
+* support DataStax Astra cloud hosted Cassandra
+
+## Sponsors ##
+Help support ongoing development and maintenance by [sponsoring Django Cassandra Engine](https://github.com/sponsors/r4fek).
+
+### Our Sponsors: ###
+<table><tr>
+<td align="center" width="300" ><a href="https://astra.dev/3xPljcu"><img src="https://www.datastax.com/sites/default/files/2021-07/astra-negative-square.png" width="90" height="90" alt="Astra DB" /><br />Astra DB</a><br/>Use Django with DataStax Astra DB - built on Apache Cassandra.</td>
+<td align="center" width="300" ><a href="https://github.com/NoiSek"><img src="https://avatars.githubusercontent.com/u/631328?v=4" width="90" height="90" alt="NoiSek" /><br/>NoiSek</a></td>
+</tr></table>
+
+
+## Installation ##
+
+Recommended installation:
+
+ pip install django-cassandra-engine
+
+## Basic Usage ##
+
+1. Add `django_cassandra_engine` to `INSTALLED_APPS` in your `settings.py` file:
+
+ INSTALLED_APPS = ('django_cassandra_engine',) + INSTALLED_APPS
+
+2. Change `DATABASES` setting:
+
+ DATABASES = {
+ 'default': {
+ 'ENGINE': 'django_cassandra_engine',
+ 'NAME': 'db',
+ 'TEST_NAME': 'test_db',
+ 'HOST': 'db1.example.com,db2.example.com',
+ 'OPTIONS': {
+ 'replication': {
+ 'strategy_class': 'SimpleStrategy',
+ 'replication_factor': 1
+ }
+ }
+ }
+ }
+
+3. Define some model:
+
+ # myapp/models.py
+
+ import uuid
+ from cassandra.cqlengine import columns
+ from django_cassandra_engine.models import DjangoCassandraModel
+
+ class ExampleModel(DjangoCassandraModel):
+ example_id = columns.UUID(primary_key=True, default=uuid.uuid4)
+ example_type = columns.Integer(index=True)
+ created_at = columns.DateTime()
+ description = columns.Text(required=False)
+
+4. Run `./manage.py sync_cassandra`
+5. Done!
+
+## Connect to Cassandra with a Cloud Config bundle ##
+To connect to a hosted Cassandra cluster that provides a secure connection bundle (ex. DataStax Astra) change the `DATABASES` setting of your settings.py:
+
+ DATABASES = {
+ 'default': {
+ 'ENGINE': 'django_cassandra_engine',
+ 'NAME': 'keyspace_name',
+ 'TEST_NAME': 'table_name',
+ 'USER': 'token',
+ 'PASSWORD': token_value,
+ 'OPTIONS': {
+ 'connection': {
+ 'cloud': {
+ 'secure_connect_bundle': '/path/to/secure/bundle.zip'
+ },
+ }
+ }
+ }
+ }
+
+## Documentation ##
+
+The documentation can be found online [here](http://r4fek.github.io/django-cassandra-engine/).
+
+## License ##
+Copyright (c) 2014-2023, [Rafał Furmański](https://linkedin.com/in/furmanski).
+
+All rights reserved. Licensed under BSD 2-Clause License.
+
+
+
+%package help
+Summary: Development documents and examples for django-cassandra-engine
+Provides: python3-django-cassandra-engine-doc
+%description help
+
+# Django Cassandra Engine - the Cassandra backend for Django #
+
+All tools you need to start your journey with Apache Cassandra and Django Framework!
+
+[![Latest version](https://img.shields.io/pypi/v/django-cassandra-engine.svg "Latest version")](https://pypi.python.org/pypi/django-cassandra-engine/)
+![workflow](https://github.com/r4fek/django-cassandra-engine/actions/workflows/tox.yml/badge.svg)
+
+Discord: https://discord.gg/pxunMGmDNc
+## Features ##
+
+* integration with latest `python-driver` and optionally `dse-driver` from DataStax
+* working `flush`, `migrate`, `sync_cassandra`, `inspectdb` and
+ `dbshell` commands
+* support for creating/destroying test database
+* accepts all `Cqlengine` and `cassandra.cluster.Cluster` connection options
+* automatic connection/disconnection handling
+* works well along with relational databases (as secondary DB)
+* storing sessions in Cassandra
+* working django forms
+* usable admin panel with Cassandra models
+* support DataStax Astra cloud hosted Cassandra
+
+## Sponsors ##
+Help support ongoing development and maintenance by [sponsoring Django Cassandra Engine](https://github.com/sponsors/r4fek).
+
+### Our Sponsors: ###
+<table><tr>
+<td align="center" width="300" ><a href="https://astra.dev/3xPljcu"><img src="https://www.datastax.com/sites/default/files/2021-07/astra-negative-square.png" width="90" height="90" alt="Astra DB" /><br />Astra DB</a><br/>Use Django with DataStax Astra DB - built on Apache Cassandra.</td>
+<td align="center" width="300" ><a href="https://github.com/NoiSek"><img src="https://avatars.githubusercontent.com/u/631328?v=4" width="90" height="90" alt="NoiSek" /><br/>NoiSek</a></td>
+</tr></table>
+
+
+## Installation ##
+
+Recommended installation:
+
+ pip install django-cassandra-engine
+
+## Basic Usage ##
+
+1. Add `django_cassandra_engine` to `INSTALLED_APPS` in your `settings.py` file:
+
+ INSTALLED_APPS = ('django_cassandra_engine',) + INSTALLED_APPS
+
+2. Change `DATABASES` setting:
+
+ DATABASES = {
+ 'default': {
+ 'ENGINE': 'django_cassandra_engine',
+ 'NAME': 'db',
+ 'TEST_NAME': 'test_db',
+ 'HOST': 'db1.example.com,db2.example.com',
+ 'OPTIONS': {
+ 'replication': {
+ 'strategy_class': 'SimpleStrategy',
+ 'replication_factor': 1
+ }
+ }
+ }
+ }
+
+3. Define some model:
+
+ # myapp/models.py
+
+ import uuid
+ from cassandra.cqlengine import columns
+ from django_cassandra_engine.models import DjangoCassandraModel
+
+ class ExampleModel(DjangoCassandraModel):
+ example_id = columns.UUID(primary_key=True, default=uuid.uuid4)
+ example_type = columns.Integer(index=True)
+ created_at = columns.DateTime()
+ description = columns.Text(required=False)
+
+4. Run `./manage.py sync_cassandra`
+5. Done!
+
+## Connect to Cassandra with a Cloud Config bundle ##
+To connect to a hosted Cassandra cluster that provides a secure connection bundle (ex. DataStax Astra) change the `DATABASES` setting of your settings.py:
+
+ DATABASES = {
+ 'default': {
+ 'ENGINE': 'django_cassandra_engine',
+ 'NAME': 'keyspace_name',
+ 'TEST_NAME': 'table_name',
+ 'USER': 'token',
+ 'PASSWORD': token_value,
+ 'OPTIONS': {
+ 'connection': {
+ 'cloud': {
+ 'secure_connect_bundle': '/path/to/secure/bundle.zip'
+ },
+ }
+ }
+ }
+ }
+
+## Documentation ##
+
+The documentation can be found online [here](http://r4fek.github.io/django-cassandra-engine/).
+
+## License ##
+Copyright (c) 2014-2023, [Rafał Furmański](https://linkedin.com/in/furmanski).
+
+All rights reserved. Licensed under BSD 2-Clause License.
+
+
+
+%prep
+%autosetup -n django-cassandra-engine-1.8.0
+
+%build
+%py3_build
+
+%install
+%py3_install
+install -d -m755 %{buildroot}/%{_pkgdocdir}
+if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi
+if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}; fi
+if [ -d example ]; then cp -arf example %{buildroot}/%{_pkgdocdir}; fi
+if [ -d examples ]; then cp -arf examples %{buildroot}/%{_pkgdocdir}; fi
+pushd %{buildroot}
+if [ -d usr/lib ]; then
+ find usr/lib -type f -printf "/%h/%f\n" >> filelist.lst
+fi
+if [ -d usr/lib64 ]; then
+ find usr/lib64 -type f -printf "/%h/%f\n" >> filelist.lst
+fi
+if [ -d usr/bin ]; then
+ find usr/bin -type f -printf "/%h/%f\n" >> filelist.lst
+fi
+if [ -d usr/sbin ]; then
+ find usr/sbin -type f -printf "/%h/%f\n" >> filelist.lst
+fi
+touch doclist.lst
+if [ -d usr/share/man ]; then
+ find usr/share/man -type f -printf "/%h/%f.gz\n" >> doclist.lst
+fi
+popd
+mv %{buildroot}/filelist.lst .
+mv %{buildroot}/doclist.lst .
+
+%files -n python3-django-cassandra-engine -f filelist.lst
+%dir %{python3_sitelib}/*
+
+%files help -f doclist.lst
+%{_docdir}/*
+
+%changelog
+* Wed May 10 2023 Python_Bot <Python_Bot@openeuler.org> - 1.8.0-1
+- Package Spec generated
diff --git a/sources b/sources
new file mode 100644
index 0000000..d146e1c
--- /dev/null
+++ b/sources
@@ -0,0 +1 @@
+94b4db0415fd16e3fbac943b917a73e4 django_cassandra_engine-1.8.0.tar.gz