summaryrefslogtreecommitdiff
path: root/python-moesifpythonrequest.spec
diff options
context:
space:
mode:
authorCoprDistGit <infra@openeuler.org>2023-05-17 04:48:41 +0000
committerCoprDistGit <infra@openeuler.org>2023-05-17 04:48:41 +0000
commit9fbc6f175883bb05d7c1c42ef98fe97243db61bd (patch)
tree6677f031bdeab1068117dc0c70e972cc33394f67 /python-moesifpythonrequest.spec
parent38cdaf755a232bc6889771f70f9289a73cbdea72 (diff)
automatic import of python-moesifpythonrequest
Diffstat (limited to 'python-moesifpythonrequest.spec')
-rw-r--r--python-moesifpythonrequest.spec357
1 files changed, 357 insertions, 0 deletions
diff --git a/python-moesifpythonrequest.spec b/python-moesifpythonrequest.spec
new file mode 100644
index 0000000..229e5cc
--- /dev/null
+++ b/python-moesifpythonrequest.spec
@@ -0,0 +1,357 @@
+%global _empty_manifest_terminate_build 0
+Name: python-moesifpythonrequest
+Version: 0.3.0
+Release: 1
+Summary: Moesif Python request
+License: Apache Software License
+URL: https://www.moesif.com/docs
+Source0: https://mirrors.nju.edu.cn/pypi/web/packages/ff/60/369c7ee2161405bce6f23ce7a0dbbb8a3d5e031088ff64805096d0d0f99d/moesifpythonrequest-0.3.0.tar.gz
+BuildArch: noarch
+
+Requires: python3-requests
+Requires: python3-moesifapi
+Requires: python3-nose
+
+%description
+## Moesif Python Requests
+
+[![Built For][ico-built-for]][link-built-for]
+[![Latest Version][ico-version]][link-package]
+[![Language Versions][ico-language]][link-language]
+[![Software License][ico-license]][link-license]
+[![Source Code][ico-source]][link-source]
+
+Interceptor for Python Requests lib to capture _outgoing_ API calls and sends to [Moesif](https://www.moesif.com) for API analytics and monitoring.
+
+_If you are using Moesif's API monitoring SDKs like [Moesif Django](https://github.com/Moesif/moesifdjango) or [Moesif WSGI](https://github.com/moesif/moesifwsgi) to log incoming API calls, this library is already included._
+
+## How to install
+
+```shell
+pip install moesifpythonrequest
+```
+
+Import the Moesif lib and call start_capture_outgoing.
+Moesif will start logging all API calls made from the requests lib.
+
+```python
+from moesifpythonrequest.start_capture.start_capture import StartCapture
+import requests
+
+moesif_settings = {
+ 'APPLICATION_ID': 'Your Moesif Application Id'
+}
+
+def main():
+ # Outgoing API call to third party like Github / Stripe or to your own dependencies
+ response = requests.get("http://httpbin.org/uuid")
+ print(response.json())
+
+StartCapture().start_capture_outgoing(moesif_settings)
+main()
+```
+
+Your Moesif Application Id can be found in the [_Moesif Portal_](https://www.moesif.com/).
+After signing up for a Moesif account, your Moesif Application Id will be displayed during the onboarding steps.
+
+## Configuration options
+
+#### _`APPLICATION_ID`_
+(required) _string_, Your Moesif Application Id which can be found by logging
+into the [_Moesif Portal_](https://www.moesif.com/), click on the top right menu,
+and then clicking _Installation_.
+
+##### __`GET_METADATA_OUTGOING`__
+(optional) _(req, res) => dictionary_, a function that enables you to return custom metadata associated with the logged API calls.
+Takes in the [Requests](http://docs.python-requests.org/en/master/api/) request and response object as arguments. You should implement a function that
+returns a dictionary containing your custom metadata. (must be able to be encoded into JSON). For example, you may want to save a VM instance_id, a trace_id, or a resource_id with the request.
+
+##### __`IDENTIFY_USER_OUTGOING`__
+(optional, but highly recommended) _(req, res) => string_, a function that takes [Requests](http://docs.python-requests.org/en/master/api/) request and response, and returns a string that is the user id used by your system. While Moesif tries to identify users automatically,
+but different frameworks and your implementation might be very different, it would be helpful and much more accurate to provide this function.
+
+##### __`IDENTIFY_COMPANY_OUTGOING`__
+(optional) _(req, res) => string_, a function that takes [Requests](http://docs.python-requests.org/en/master/api/) request and response, and returns a string that is the company id for this event.
+
+##### __`GET_SESSION_TOKEN_OUTGOING`__
+(optional) _(req, res) => string_, a function that takes [Requests](http://docs.python-requests.org/en/master/api/) request and response, and returns a string that is the session token for this event. Again, Moesif tries to get the session token automatically, but if you setup is very different from standard, this function will be very help for tying events together, and help you replay the events.
+
+##### __`LOG_BODY_OUTGOING`__
+(optional) _boolean_, default True, Set to False to remove logging request and response body.
+
+##### __`SKIP_OUTGOING`__
+(optional) _(req, res) => boolean_, a function that takes a [Requests](http://docs.python-requests.org/en/master/api/) request and response,
+and returns true if you want to skip this particular event.
+
+#### __`MASK_EVENT_MODEL`__
+(optional) _(EventModel) => EventModel_, a function that takes a [Moesif EventModel](https://github.com/Moesif/moesifapi-python/blob/master/moesifapi/models/event_model.py) and returns an EventModel with desired data removed. For details regarding EventModel please see the [Moesif Python API Documentation](https://www.moesif.com/docs/api?python).
+
+## Example
+
+An example Moesif integration is [available on GitHub](https://github.com/Moesif/moesif-python-outgoing-example)
+
+## Other integrations
+
+To view more documentation on integration options, please visit __[the Integration Options Documentation](https://www.moesif.com/docs/getting-started/integration-options/).__
+
+[ico-built-for]: https://img.shields.io/badge/built%20for-python%20requests-blue.svg
+[ico-version]: https://img.shields.io/pypi/v/moesifpythonrequest.svg
+[ico-language]: https://img.shields.io/pypi/pyversions/moesifpythonrequest.svg
+[ico-license]: https://img.shields.io/badge/License-Apache%202.0-green.svg
+[ico-source]: https://img.shields.io/github/last-commit/moesif/moesifpythonrequest.svg?style=social
+
+[link-built-for]: http://docs.python-requests.org/en/master/
+[link-package]: https://pypi.python.org/pypi/moesifpythonrequest
+[link-language]: https://pypi.python.org/pypi/moesifpythonrequest
+[link-license]: https://raw.githubusercontent.com/Moesif/moesifpythonrequest/master/LICENSE
+[link-source]: https://github.com/Moesif/moesifpythonrequest
+
+
+
+
+%package -n python3-moesifpythonrequest
+Summary: Moesif Python request
+Provides: python-moesifpythonrequest
+BuildRequires: python3-devel
+BuildRequires: python3-setuptools
+BuildRequires: python3-pip
+%description -n python3-moesifpythonrequest
+## Moesif Python Requests
+
+[![Built For][ico-built-for]][link-built-for]
+[![Latest Version][ico-version]][link-package]
+[![Language Versions][ico-language]][link-language]
+[![Software License][ico-license]][link-license]
+[![Source Code][ico-source]][link-source]
+
+Interceptor for Python Requests lib to capture _outgoing_ API calls and sends to [Moesif](https://www.moesif.com) for API analytics and monitoring.
+
+_If you are using Moesif's API monitoring SDKs like [Moesif Django](https://github.com/Moesif/moesifdjango) or [Moesif WSGI](https://github.com/moesif/moesifwsgi) to log incoming API calls, this library is already included._
+
+## How to install
+
+```shell
+pip install moesifpythonrequest
+```
+
+Import the Moesif lib and call start_capture_outgoing.
+Moesif will start logging all API calls made from the requests lib.
+
+```python
+from moesifpythonrequest.start_capture.start_capture import StartCapture
+import requests
+
+moesif_settings = {
+ 'APPLICATION_ID': 'Your Moesif Application Id'
+}
+
+def main():
+ # Outgoing API call to third party like Github / Stripe or to your own dependencies
+ response = requests.get("http://httpbin.org/uuid")
+ print(response.json())
+
+StartCapture().start_capture_outgoing(moesif_settings)
+main()
+```
+
+Your Moesif Application Id can be found in the [_Moesif Portal_](https://www.moesif.com/).
+After signing up for a Moesif account, your Moesif Application Id will be displayed during the onboarding steps.
+
+## Configuration options
+
+#### _`APPLICATION_ID`_
+(required) _string_, Your Moesif Application Id which can be found by logging
+into the [_Moesif Portal_](https://www.moesif.com/), click on the top right menu,
+and then clicking _Installation_.
+
+##### __`GET_METADATA_OUTGOING`__
+(optional) _(req, res) => dictionary_, a function that enables you to return custom metadata associated with the logged API calls.
+Takes in the [Requests](http://docs.python-requests.org/en/master/api/) request and response object as arguments. You should implement a function that
+returns a dictionary containing your custom metadata. (must be able to be encoded into JSON). For example, you may want to save a VM instance_id, a trace_id, or a resource_id with the request.
+
+##### __`IDENTIFY_USER_OUTGOING`__
+(optional, but highly recommended) _(req, res) => string_, a function that takes [Requests](http://docs.python-requests.org/en/master/api/) request and response, and returns a string that is the user id used by your system. While Moesif tries to identify users automatically,
+but different frameworks and your implementation might be very different, it would be helpful and much more accurate to provide this function.
+
+##### __`IDENTIFY_COMPANY_OUTGOING`__
+(optional) _(req, res) => string_, a function that takes [Requests](http://docs.python-requests.org/en/master/api/) request and response, and returns a string that is the company id for this event.
+
+##### __`GET_SESSION_TOKEN_OUTGOING`__
+(optional) _(req, res) => string_, a function that takes [Requests](http://docs.python-requests.org/en/master/api/) request and response, and returns a string that is the session token for this event. Again, Moesif tries to get the session token automatically, but if you setup is very different from standard, this function will be very help for tying events together, and help you replay the events.
+
+##### __`LOG_BODY_OUTGOING`__
+(optional) _boolean_, default True, Set to False to remove logging request and response body.
+
+##### __`SKIP_OUTGOING`__
+(optional) _(req, res) => boolean_, a function that takes a [Requests](http://docs.python-requests.org/en/master/api/) request and response,
+and returns true if you want to skip this particular event.
+
+#### __`MASK_EVENT_MODEL`__
+(optional) _(EventModel) => EventModel_, a function that takes a [Moesif EventModel](https://github.com/Moesif/moesifapi-python/blob/master/moesifapi/models/event_model.py) and returns an EventModel with desired data removed. For details regarding EventModel please see the [Moesif Python API Documentation](https://www.moesif.com/docs/api?python).
+
+## Example
+
+An example Moesif integration is [available on GitHub](https://github.com/Moesif/moesif-python-outgoing-example)
+
+## Other integrations
+
+To view more documentation on integration options, please visit __[the Integration Options Documentation](https://www.moesif.com/docs/getting-started/integration-options/).__
+
+[ico-built-for]: https://img.shields.io/badge/built%20for-python%20requests-blue.svg
+[ico-version]: https://img.shields.io/pypi/v/moesifpythonrequest.svg
+[ico-language]: https://img.shields.io/pypi/pyversions/moesifpythonrequest.svg
+[ico-license]: https://img.shields.io/badge/License-Apache%202.0-green.svg
+[ico-source]: https://img.shields.io/github/last-commit/moesif/moesifpythonrequest.svg?style=social
+
+[link-built-for]: http://docs.python-requests.org/en/master/
+[link-package]: https://pypi.python.org/pypi/moesifpythonrequest
+[link-language]: https://pypi.python.org/pypi/moesifpythonrequest
+[link-license]: https://raw.githubusercontent.com/Moesif/moesifpythonrequest/master/LICENSE
+[link-source]: https://github.com/Moesif/moesifpythonrequest
+
+
+
+
+%package help
+Summary: Development documents and examples for moesifpythonrequest
+Provides: python3-moesifpythonrequest-doc
+%description help
+## Moesif Python Requests
+
+[![Built For][ico-built-for]][link-built-for]
+[![Latest Version][ico-version]][link-package]
+[![Language Versions][ico-language]][link-language]
+[![Software License][ico-license]][link-license]
+[![Source Code][ico-source]][link-source]
+
+Interceptor for Python Requests lib to capture _outgoing_ API calls and sends to [Moesif](https://www.moesif.com) for API analytics and monitoring.
+
+_If you are using Moesif's API monitoring SDKs like [Moesif Django](https://github.com/Moesif/moesifdjango) or [Moesif WSGI](https://github.com/moesif/moesifwsgi) to log incoming API calls, this library is already included._
+
+## How to install
+
+```shell
+pip install moesifpythonrequest
+```
+
+Import the Moesif lib and call start_capture_outgoing.
+Moesif will start logging all API calls made from the requests lib.
+
+```python
+from moesifpythonrequest.start_capture.start_capture import StartCapture
+import requests
+
+moesif_settings = {
+ 'APPLICATION_ID': 'Your Moesif Application Id'
+}
+
+def main():
+ # Outgoing API call to third party like Github / Stripe or to your own dependencies
+ response = requests.get("http://httpbin.org/uuid")
+ print(response.json())
+
+StartCapture().start_capture_outgoing(moesif_settings)
+main()
+```
+
+Your Moesif Application Id can be found in the [_Moesif Portal_](https://www.moesif.com/).
+After signing up for a Moesif account, your Moesif Application Id will be displayed during the onboarding steps.
+
+## Configuration options
+
+#### _`APPLICATION_ID`_
+(required) _string_, Your Moesif Application Id which can be found by logging
+into the [_Moesif Portal_](https://www.moesif.com/), click on the top right menu,
+and then clicking _Installation_.
+
+##### __`GET_METADATA_OUTGOING`__
+(optional) _(req, res) => dictionary_, a function that enables you to return custom metadata associated with the logged API calls.
+Takes in the [Requests](http://docs.python-requests.org/en/master/api/) request and response object as arguments. You should implement a function that
+returns a dictionary containing your custom metadata. (must be able to be encoded into JSON). For example, you may want to save a VM instance_id, a trace_id, or a resource_id with the request.
+
+##### __`IDENTIFY_USER_OUTGOING`__
+(optional, but highly recommended) _(req, res) => string_, a function that takes [Requests](http://docs.python-requests.org/en/master/api/) request and response, and returns a string that is the user id used by your system. While Moesif tries to identify users automatically,
+but different frameworks and your implementation might be very different, it would be helpful and much more accurate to provide this function.
+
+##### __`IDENTIFY_COMPANY_OUTGOING`__
+(optional) _(req, res) => string_, a function that takes [Requests](http://docs.python-requests.org/en/master/api/) request and response, and returns a string that is the company id for this event.
+
+##### __`GET_SESSION_TOKEN_OUTGOING`__
+(optional) _(req, res) => string_, a function that takes [Requests](http://docs.python-requests.org/en/master/api/) request and response, and returns a string that is the session token for this event. Again, Moesif tries to get the session token automatically, but if you setup is very different from standard, this function will be very help for tying events together, and help you replay the events.
+
+##### __`LOG_BODY_OUTGOING`__
+(optional) _boolean_, default True, Set to False to remove logging request and response body.
+
+##### __`SKIP_OUTGOING`__
+(optional) _(req, res) => boolean_, a function that takes a [Requests](http://docs.python-requests.org/en/master/api/) request and response,
+and returns true if you want to skip this particular event.
+
+#### __`MASK_EVENT_MODEL`__
+(optional) _(EventModel) => EventModel_, a function that takes a [Moesif EventModel](https://github.com/Moesif/moesifapi-python/blob/master/moesifapi/models/event_model.py) and returns an EventModel with desired data removed. For details regarding EventModel please see the [Moesif Python API Documentation](https://www.moesif.com/docs/api?python).
+
+## Example
+
+An example Moesif integration is [available on GitHub](https://github.com/Moesif/moesif-python-outgoing-example)
+
+## Other integrations
+
+To view more documentation on integration options, please visit __[the Integration Options Documentation](https://www.moesif.com/docs/getting-started/integration-options/).__
+
+[ico-built-for]: https://img.shields.io/badge/built%20for-python%20requests-blue.svg
+[ico-version]: https://img.shields.io/pypi/v/moesifpythonrequest.svg
+[ico-language]: https://img.shields.io/pypi/pyversions/moesifpythonrequest.svg
+[ico-license]: https://img.shields.io/badge/License-Apache%202.0-green.svg
+[ico-source]: https://img.shields.io/github/last-commit/moesif/moesifpythonrequest.svg?style=social
+
+[link-built-for]: http://docs.python-requests.org/en/master/
+[link-package]: https://pypi.python.org/pypi/moesifpythonrequest
+[link-language]: https://pypi.python.org/pypi/moesifpythonrequest
+[link-license]: https://raw.githubusercontent.com/Moesif/moesifpythonrequest/master/LICENSE
+[link-source]: https://github.com/Moesif/moesifpythonrequest
+
+
+
+
+%prep
+%autosetup -n moesifpythonrequest-0.3.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-moesifpythonrequest -f filelist.lst
+%dir %{python3_sitelib}/*
+
+%files help -f doclist.lst
+%{_docdir}/*
+
+%changelog
+* Wed May 17 2023 Python_Bot <Python_Bot@openeuler.org> - 0.3.0-1
+- Package Spec generated