%global _empty_manifest_terminate_build 0
Name:		python-fortifyapi
Version:	3.1.4
Release:	1
Summary:	Python library for Fortify Software Security Center (SSC) RESTFul API
License:	MIT
URL:		https://github.com/fortifyadmin/fortifyapi
Source0:	https://mirrors.nju.edu.cn/pypi/web/packages/35/3d/0f18fc995d99e8efec7dfa1aaefcfc5a42919cc2aad60576d4fe93cbf1b2/fortifyapi-3.1.4.tar.gz
BuildArch:	noarch
Requires:	python3-requests
%description
.. image:: https://img.shields.io/pypi/v/fortifyapi.svg
.. image:: https://img.shields.io/pypi/pyversions/fortifyapi.svg
.. image:: https://img.shields.io/circleci/build/github/fortifyadmin/fortifyapi/master?logo=CircleCI
Fortify API
***********
Fortify API is a Python RESTFul API client module for Fortify's `Software Security Center `_
Quick Start
~~~~~~~~~~~
Several quick start options are available:
- Build locally: ``pip install wheel setuptools && python setup.py build`` 
- Install with pip (recommended): ``pip install fortifyapi``
- `Download the latest release `__.
Example
~~~~~~~
.. code:: python
   from os import environ
   from locale import LC_ALL, setlocale
   from fortifyapi.fortify import FortifyApi
   # Set encoding
   environ["PYTHONIOENCODING"] = "utf-8"
   myLocale = setlocale(category=LC_ALL, locale="en_GB.UTF-8")
   # Set vars for connection
   url = 'https://some-fortify-host/ssc'
   user = 'Fortify SSC User'
   password = 'Fortify SSC Password'
   description = 'fortifyapi test client'
   # Authenticate and retrieve token
   def token():
       api = FortifyApi(host=url, username=user, password=password, verify_ssl=False)
       response = api.get_token(description=description)
       return response.data['data']['token']
   # Re-use token in all requests
   def api():
       api = FortifyApi(host=url, token=token(), verify_ssl=False)
       return api
   # List ID, Project/application Version
   def list():
       response = api().get_all_project_versions()
       data = response.data['data']
       for version in data:
           print("{0:8} {1:30} {2:30}".format(version['id'], version['project']['name'], version['name']).encode(
               'utf-8', errors='ignore').decode())
   if __name__ == '__main__':
        list()
Bugs and Feature Requests
~~~~~~~~~~~~~~~~~~~~~~~~~
Found something that doesn't seem right or have a feature request? Please open a new issue.
Copyright and License
~~~~~~~~~~~~~~~~~~~~~
.. image:: https://img.shields.io/github/license/fortifyadmin/fortifyapi.svg?style=flat-square
%package -n python3-fortifyapi
Summary:	Python library for Fortify Software Security Center (SSC) RESTFul API
Provides:	python-fortifyapi
BuildRequires:	python3-devel
BuildRequires:	python3-setuptools
BuildRequires:	python3-pip
%description -n python3-fortifyapi
.. image:: https://img.shields.io/pypi/v/fortifyapi.svg
.. image:: https://img.shields.io/pypi/pyversions/fortifyapi.svg
.. image:: https://img.shields.io/circleci/build/github/fortifyadmin/fortifyapi/master?logo=CircleCI
Fortify API
***********
Fortify API is a Python RESTFul API client module for Fortify's `Software Security Center `_
Quick Start
~~~~~~~~~~~
Several quick start options are available:
- Build locally: ``pip install wheel setuptools && python setup.py build`` 
- Install with pip (recommended): ``pip install fortifyapi``
- `Download the latest release `__.
Example
~~~~~~~
.. code:: python
   from os import environ
   from locale import LC_ALL, setlocale
   from fortifyapi.fortify import FortifyApi
   # Set encoding
   environ["PYTHONIOENCODING"] = "utf-8"
   myLocale = setlocale(category=LC_ALL, locale="en_GB.UTF-8")
   # Set vars for connection
   url = 'https://some-fortify-host/ssc'
   user = 'Fortify SSC User'
   password = 'Fortify SSC Password'
   description = 'fortifyapi test client'
   # Authenticate and retrieve token
   def token():
       api = FortifyApi(host=url, username=user, password=password, verify_ssl=False)
       response = api.get_token(description=description)
       return response.data['data']['token']
   # Re-use token in all requests
   def api():
       api = FortifyApi(host=url, token=token(), verify_ssl=False)
       return api
   # List ID, Project/application Version
   def list():
       response = api().get_all_project_versions()
       data = response.data['data']
       for version in data:
           print("{0:8} {1:30} {2:30}".format(version['id'], version['project']['name'], version['name']).encode(
               'utf-8', errors='ignore').decode())
   if __name__ == '__main__':
        list()
Bugs and Feature Requests
~~~~~~~~~~~~~~~~~~~~~~~~~
Found something that doesn't seem right or have a feature request? Please open a new issue.
Copyright and License
~~~~~~~~~~~~~~~~~~~~~
.. image:: https://img.shields.io/github/license/fortifyadmin/fortifyapi.svg?style=flat-square
%package help
Summary:	Development documents and examples for fortifyapi
Provides:	python3-fortifyapi-doc
%description help
.. image:: https://img.shields.io/pypi/v/fortifyapi.svg
.. image:: https://img.shields.io/pypi/pyversions/fortifyapi.svg
.. image:: https://img.shields.io/circleci/build/github/fortifyadmin/fortifyapi/master?logo=CircleCI
Fortify API
***********
Fortify API is a Python RESTFul API client module for Fortify's `Software Security Center `_
Quick Start
~~~~~~~~~~~
Several quick start options are available:
- Build locally: ``pip install wheel setuptools && python setup.py build`` 
- Install with pip (recommended): ``pip install fortifyapi``
- `Download the latest release `__.
Example
~~~~~~~
.. code:: python
   from os import environ
   from locale import LC_ALL, setlocale
   from fortifyapi.fortify import FortifyApi
   # Set encoding
   environ["PYTHONIOENCODING"] = "utf-8"
   myLocale = setlocale(category=LC_ALL, locale="en_GB.UTF-8")
   # Set vars for connection
   url = 'https://some-fortify-host/ssc'
   user = 'Fortify SSC User'
   password = 'Fortify SSC Password'
   description = 'fortifyapi test client'
   # Authenticate and retrieve token
   def token():
       api = FortifyApi(host=url, username=user, password=password, verify_ssl=False)
       response = api.get_token(description=description)
       return response.data['data']['token']
   # Re-use token in all requests
   def api():
       api = FortifyApi(host=url, token=token(), verify_ssl=False)
       return api
   # List ID, Project/application Version
   def list():
       response = api().get_all_project_versions()
       data = response.data['data']
       for version in data:
           print("{0:8} {1:30} {2:30}".format(version['id'], version['project']['name'], version['name']).encode(
               'utf-8', errors='ignore').decode())
   if __name__ == '__main__':
        list()
Bugs and Feature Requests
~~~~~~~~~~~~~~~~~~~~~~~~~
Found something that doesn't seem right or have a feature request? Please open a new issue.
Copyright and License
~~~~~~~~~~~~~~~~~~~~~
.. image:: https://img.shields.io/github/license/fortifyadmin/fortifyapi.svg?style=flat-square
%prep
%autosetup -n fortifyapi-3.1.4
%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-fortifyapi -f filelist.lst
%dir %{python3_sitelib}/*
%files help -f doclist.lst
%{_docdir}/*
%changelog
* Fri May 05 2023 Python_Bot  - 3.1.4-1
- Package Spec generated