summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore1
-rw-r--r--python-event-tracking.spec270
-rw-r--r--sources1
3 files changed, 272 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
index e69de29..ea097f0 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/event-tracking-2.1.0.tar.gz
diff --git a/python-event-tracking.spec b/python-event-tracking.spec
new file mode 100644
index 0000000..bc0af76
--- /dev/null
+++ b/python-event-tracking.spec
@@ -0,0 +1,270 @@
+%global _empty_manifest_terminate_build 0
+Name: python-event-tracking
+Version: 2.1.0
+Release: 1
+Summary: A simple event tracking system.
+License: AGPLv3 License
+URL: https://github.com/edx/event-tracking
+Source0: https://mirrors.nju.edu.cn/pypi/web/packages/e5/55/8a12beb5a5e1b8ab840407fc182aa2dcdda4fb2a1b855e9fb44539edb352/event-tracking-2.1.0.tar.gz
+BuildArch: noarch
+
+Requires: python3-django
+Requires: python3-celery
+Requires: python3-edx-django-utils
+Requires: python3-pytz
+Requires: python3-pymongo
+Requires: python3-six
+
+%description
+The ``event-tracking`` library tracks context-aware semi-structured system events.
+It captures and stores events with nested data structures in order to truly
+take advantage of schemaless data storage systems.
+Key features:
+* Multiple backends - define custom backends that can be used to persist
+ your event data.
+* Nested contexts - allows data to be injected into events even without
+ having to pass around all of said data to every location where the events
+ are emitted.
+* Django integration - provides a Django app that allows context aware events
+ to easily be captured by multi-threaded web applications.
+* MongoDB integration - support writing events out to a mongo collection.
+Example::
+ from eventtracking import tracker
+ tracker = tracker.get_tracker()
+ tracker.enter_context('outer', {'user_id': 10938})
+ tracker.emit('navigation.request', {'url': 'http://www.edx.org/some/path/1'})
+ with tracker.context({'user_id': 11111, 'session_id': '2987lkjdyoioey'}):
+ tracker.emit('navigation.request', {'url': 'http://www.edx.org/some/path/2'})
+ tracker.emit(
+ 'address.create',
+ {
+ 'name': 'foo',
+ 'address': {
+ 'postal_code': '90210',
+ 'country': 'United States'
+ }
+ }
+ )
+Running the above example produces the following events::
+ {
+ "name": "navigation.request",
+ "timestamp": ...,
+ "context": {
+ "user_id": 10938
+ },
+ "data": {
+ "url": "http://www.edx.org/some/path/1"
+ }
+ },
+ {
+ "name": "navigation.request",
+ "timestamp": ...,
+ "context": {
+ "user_id": 11111,
+ "session_id": "2987lkjdyoioey"
+ },
+ "data": {
+ "url": "http://www.edx.org/some/path/2"
+ }
+ },
+ {
+ "name": "address.create",
+ "timestamp": ...,
+ "context": {
+ "user_id": 10938
+ },
+ "data": {
+ "name": "foo",
+ "address": {
+ "postal_code": "90210",
+ "country": "United States"
+ }
+ }
+ }
+
+%package -n python3-event-tracking
+Summary: A simple event tracking system.
+Provides: python-event-tracking
+BuildRequires: python3-devel
+BuildRequires: python3-setuptools
+BuildRequires: python3-pip
+%description -n python3-event-tracking
+The ``event-tracking`` library tracks context-aware semi-structured system events.
+It captures and stores events with nested data structures in order to truly
+take advantage of schemaless data storage systems.
+Key features:
+* Multiple backends - define custom backends that can be used to persist
+ your event data.
+* Nested contexts - allows data to be injected into events even without
+ having to pass around all of said data to every location where the events
+ are emitted.
+* Django integration - provides a Django app that allows context aware events
+ to easily be captured by multi-threaded web applications.
+* MongoDB integration - support writing events out to a mongo collection.
+Example::
+ from eventtracking import tracker
+ tracker = tracker.get_tracker()
+ tracker.enter_context('outer', {'user_id': 10938})
+ tracker.emit('navigation.request', {'url': 'http://www.edx.org/some/path/1'})
+ with tracker.context({'user_id': 11111, 'session_id': '2987lkjdyoioey'}):
+ tracker.emit('navigation.request', {'url': 'http://www.edx.org/some/path/2'})
+ tracker.emit(
+ 'address.create',
+ {
+ 'name': 'foo',
+ 'address': {
+ 'postal_code': '90210',
+ 'country': 'United States'
+ }
+ }
+ )
+Running the above example produces the following events::
+ {
+ "name": "navigation.request",
+ "timestamp": ...,
+ "context": {
+ "user_id": 10938
+ },
+ "data": {
+ "url": "http://www.edx.org/some/path/1"
+ }
+ },
+ {
+ "name": "navigation.request",
+ "timestamp": ...,
+ "context": {
+ "user_id": 11111,
+ "session_id": "2987lkjdyoioey"
+ },
+ "data": {
+ "url": "http://www.edx.org/some/path/2"
+ }
+ },
+ {
+ "name": "address.create",
+ "timestamp": ...,
+ "context": {
+ "user_id": 10938
+ },
+ "data": {
+ "name": "foo",
+ "address": {
+ "postal_code": "90210",
+ "country": "United States"
+ }
+ }
+ }
+
+%package help
+Summary: Development documents and examples for event-tracking
+Provides: python3-event-tracking-doc
+%description help
+The ``event-tracking`` library tracks context-aware semi-structured system events.
+It captures and stores events with nested data structures in order to truly
+take advantage of schemaless data storage systems.
+Key features:
+* Multiple backends - define custom backends that can be used to persist
+ your event data.
+* Nested contexts - allows data to be injected into events even without
+ having to pass around all of said data to every location where the events
+ are emitted.
+* Django integration - provides a Django app that allows context aware events
+ to easily be captured by multi-threaded web applications.
+* MongoDB integration - support writing events out to a mongo collection.
+Example::
+ from eventtracking import tracker
+ tracker = tracker.get_tracker()
+ tracker.enter_context('outer', {'user_id': 10938})
+ tracker.emit('navigation.request', {'url': 'http://www.edx.org/some/path/1'})
+ with tracker.context({'user_id': 11111, 'session_id': '2987lkjdyoioey'}):
+ tracker.emit('navigation.request', {'url': 'http://www.edx.org/some/path/2'})
+ tracker.emit(
+ 'address.create',
+ {
+ 'name': 'foo',
+ 'address': {
+ 'postal_code': '90210',
+ 'country': 'United States'
+ }
+ }
+ )
+Running the above example produces the following events::
+ {
+ "name": "navigation.request",
+ "timestamp": ...,
+ "context": {
+ "user_id": 10938
+ },
+ "data": {
+ "url": "http://www.edx.org/some/path/1"
+ }
+ },
+ {
+ "name": "navigation.request",
+ "timestamp": ...,
+ "context": {
+ "user_id": 11111,
+ "session_id": "2987lkjdyoioey"
+ },
+ "data": {
+ "url": "http://www.edx.org/some/path/2"
+ }
+ },
+ {
+ "name": "address.create",
+ "timestamp": ...,
+ "context": {
+ "user_id": 10938
+ },
+ "data": {
+ "name": "foo",
+ "address": {
+ "postal_code": "90210",
+ "country": "United States"
+ }
+ }
+ }
+
+%prep
+%autosetup -n event-tracking-2.1.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-event-tracking -f filelist.lst
+%dir %{python3_sitelib}/*
+
+%files help -f doclist.lst
+%{_docdir}/*
+
+%changelog
+* Tue Apr 11 2023 Python_Bot <Python_Bot@openeuler.org> - 2.1.0-1
+- Package Spec generated
diff --git a/sources b/sources
new file mode 100644
index 0000000..7d7a73d
--- /dev/null
+++ b/sources
@@ -0,0 +1 @@
+70a9e80410bb8b8fa889f6f0428f004a event-tracking-2.1.0.tar.gz