Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
lint:
uses: mhils/workflows/.github/workflows/python-tox.yml@v11
with:
cmd: tox -e lint || true
cmd: tox -e lint

filename-matching:
uses: mhils/workflows/.github/workflows/python-tox.yml@v11
Expand Down
1 change: 1 addition & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
Please contribute upstream--we follow mitmproxy, but they
are the source of truth for the proxy in general.


----------------------------------
As an open source project, mitmproxy welcomes contributions of all forms. If you would like to bring the project
forward, please consider contributing in the following areas:
Expand Down
64 changes: 35 additions & 29 deletions clients/examples/python/docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@
#
import os
import sys
sys.path.insert(0, os.path.abspath('..'))

sys.path.insert(0, os.path.abspath(".."))

import browserup_mitmproxy_python_client_usage_example

Expand All @@ -31,22 +32,22 @@

# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
extensions = ['sphinx.ext.autodoc', 'sphinx.ext.viewcode']
extensions = ["sphinx.ext.autodoc", "sphinx.ext.viewcode"]

# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']
templates_path = ["_templates"]

# The suffix(es) of source filenames.
# You can specify multiple suffix as a list of string:
#
# source_suffix = ['.rst', '.md']
source_suffix = '.rst'
source_suffix = ".rst"

# The master toctree document.
master_doc = 'index'
master_doc = "index"

# General information about the project.
project = 'Browserup MitmProxy Python Client Usage Example'
project = "Browserup MitmProxy Python Client Usage Example"
copyright = "2021, Browserup Inc."
author = "Browserup Inc."

Expand All @@ -69,10 +70,10 @@
# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
# This patterns also effect to html_static_path and html_extra_path
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']
exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"]

# The name of the Pygments (syntax highlighting) style to use.
pygments_style = 'sphinx'
pygments_style = "sphinx"

# If true, `todo` and `todoList` produce output, else they produce nothing.
todo_include_todos = False
Expand All @@ -83,7 +84,7 @@
# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
#
html_theme = 'alabaster'
html_theme = "alabaster"

# Theme options are theme-specific and customize the look and feel of a
# theme further. For a list of options available for each theme, see the
Expand All @@ -94,13 +95,13 @@
# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ['_static']
html_static_path = ["_static"]


# -- Options for HTMLHelp output ---------------------------------------

# Output file base name for HTML help builder.
htmlhelp_basename = 'browserup_mitmproxy_python_client_usage_exampledoc'
htmlhelp_basename = "browserup_mitmproxy_python_client_usage_exampledoc"


# -- Options for LaTeX output ------------------------------------------
Expand All @@ -109,15 +110,12 @@
# The paper size ('letterpaper' or 'a4paper').
#
# 'papersize': 'letterpaper',

# The font size ('10pt', '11pt' or '12pt').
#
# 'pointsize': '10pt',

# Additional stuff for the LaTeX preamble.
#
# 'preamble': '',

# Latex figure (float) alignment
#
# 'figure_align': 'htbp',
Expand All @@ -127,9 +125,13 @@
# (source start file, target name, title, author, documentclass
# [howto, manual, or own class]).
latex_documents = [
(master_doc, 'browserup_mitmproxy_python_client_usage_example.tex',
'Browserup MitmProxy Python Client Usage Example Documentation',
'Browserup Inc.', 'manual'),
(
master_doc,
"browserup_mitmproxy_python_client_usage_example.tex",
"Browserup MitmProxy Python Client Usage Example Documentation",
"Browserup Inc.",
"manual",
),
]


Expand All @@ -138,9 +140,13 @@
# One entry per manual page. List of tuples
# (source start file, name, description, authors, manual section).
man_pages = [
(master_doc, 'browserup_mitmproxy_python_client_usage_example',
'Browserup MitmProxy Python Client Usage Example Documentation',
[author], 1)
(
master_doc,
"browserup_mitmproxy_python_client_usage_example",
"Browserup MitmProxy Python Client Usage Example Documentation",
[author],
1,
)
]


Expand All @@ -150,13 +156,13 @@
# (source start file, target name, title, author,
# dir menu entry, description, category)
texinfo_documents = [
(master_doc, 'browserup_mitmproxy_python_client_usage_example',
'Browserup MitmProxy Python Client Usage Example Documentation',
author,
'browserup_mitmproxy_python_client_usage_example',
'One line description of project.',
'Miscellaneous'),
(
master_doc,
"browserup_mitmproxy_python_client_usage_example",
"Browserup MitmProxy Python Client Usage Example Documentation",
author,
"browserup_mitmproxy_python_client_usage_example",
"One line description of project.",
"Miscellaneous",
),
]



50 changes: 28 additions & 22 deletions clients/examples/python/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,43 +2,49 @@

"""The setup script."""

from setuptools import setup, find_packages
from setuptools import find_packages
from setuptools import setup

with open('README.rst') as readme_file:
with open("README.rst") as readme_file:
readme = readme_file.read()

with open('HISTORY.rst') as history_file:
with open("HISTORY.rst") as history_file:
history = history_file.read()

requirements = [ ]
requirements = []

test_requirements = [ ]
test_requirements = []

setup(
author="Browserup Inc.",
author_email='developers@browserup.com',
python_requires='>=3.6',
author_email="developers@browserup.com",
python_requires=">=3.6",
classifiers=[
'Development Status :: 2 - Pre-Alpha',
'Intended Audience :: Developers',
'License :: OSI Approved :: Apache Software License',
'Natural Language :: English',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
"Development Status :: 2 - Pre-Alpha",
"Intended Audience :: Developers",
"License :: OSI Approved :: Apache Software License",
"Natural Language :: English",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
],
description="Browserup MitmProxy Python Client Usage Example",
install_requires=requirements,
license="Apache Software License 2.0",
long_description=readme + '\n\n' + history,
long_description=readme + "\n\n" + history,
include_package_data=True,
keywords='browserup_mitmproxy_python_client_usage_example',
name='browserup_mitmproxy_python_client_usage_example',
packages=find_packages(include=['browserup_mitmproxy_python_client_usage_example', 'browserup_mitmproxy_python_client_usage_example.*']),
test_suite='tests',
keywords="browserup_mitmproxy_python_client_usage_example",
name="browserup_mitmproxy_python_client_usage_example",
packages=find_packages(
include=[
"browserup_mitmproxy_python_client_usage_example",
"browserup_mitmproxy_python_client_usage_example.*",
]
),
test_suite="tests",
tests_require=test_requirements,
url='https://github.com/browserup/browserup_mitmproxy_python_client_usage_example',
version='0.1.0',
url="https://github.com/browserup/browserup_mitmproxy_python_client_usage_example",
version="0.1.0",
zip_safe=False,
)
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,11 @@
import unittest

import BrowserUpMitmProxyClient

from pprint import pprint
from BrowserUpMitmProxyClient.api import browser_up_proxy_api
from BrowserUpMitmProxyClient.model.counter import Counter
from BrowserUpMitmProxyClient.model.error import Error
from BrowserUpMitmProxyClient.model.har import Har
from BrowserUpMitmProxyClient.model.match_criteria import MatchCriteria
from BrowserUpMitmProxyClient.model.verify_result import VerifyResult


class TestBrowserupMitmProxyPythonClient(unittest.TestCase):

def setUp(self):
"""Configure client"""
self.configuration = BrowserUpMitmProxyClient.Configuration(
Expand Down Expand Up @@ -63,4 +56,8 @@ def test_adding_counter_using_client(self):
har = self.api_instance.get_har_log()

self.assertTrue(
any(item.name == counter.name and item.value == counter.value for item in har.log.pages[0].counters))
any(
item.name == counter.name and item.value == counter.value
for item in har.log.pages[0].counters
)
)
41 changes: 27 additions & 14 deletions clients/python/BrowserUpMitmProxyClient/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,17 @@
# flake8: noqa

"""
BrowserUp MitmProxy
BrowserUp MitmProxy

___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___
___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___

The version of the OpenAPI document: 1.0.0
Contact: developers@browserup.com
Generated by OpenAPI Generator (https://openapi-generator.tech)
The version of the OpenAPI document: 1.0.0
Contact: developers@browserup.com
Generated by OpenAPI Generator (https://openapi-generator.tech)

Do not edit the class manually.
Do not edit the class manually.
""" # noqa: E501


__version__ = "1.0.1"

# import apis into sdk package
Expand All @@ -38,19 +37,33 @@
from BrowserUpMitmProxyClient.models.har import Har
from BrowserUpMitmProxyClient.models.har_entry import HarEntry
from BrowserUpMitmProxyClient.models.har_entry_cache import HarEntryCache
from BrowserUpMitmProxyClient.models.har_entry_cache_before_request import HarEntryCacheBeforeRequest
from BrowserUpMitmProxyClient.models.har_entry_cache_before_request import (
HarEntryCacheBeforeRequest,
)
from BrowserUpMitmProxyClient.models.har_entry_request import HarEntryRequest
from BrowserUpMitmProxyClient.models.har_entry_request_cookies_inner import HarEntryRequestCookiesInner
from BrowserUpMitmProxyClient.models.har_entry_request_post_data import HarEntryRequestPostData
from BrowserUpMitmProxyClient.models.har_entry_request_post_data_params_inner import HarEntryRequestPostDataParamsInner
from BrowserUpMitmProxyClient.models.har_entry_request_query_string_inner import HarEntryRequestQueryStringInner
from BrowserUpMitmProxyClient.models.har_entry_request_cookies_inner import (
HarEntryRequestCookiesInner,
)
from BrowserUpMitmProxyClient.models.har_entry_request_post_data import (
HarEntryRequestPostData,
)
from BrowserUpMitmProxyClient.models.har_entry_request_post_data_params_inner import (
HarEntryRequestPostDataParamsInner,
)
from BrowserUpMitmProxyClient.models.har_entry_request_query_string_inner import (
HarEntryRequestQueryStringInner,
)
from BrowserUpMitmProxyClient.models.har_entry_response import HarEntryResponse
from BrowserUpMitmProxyClient.models.har_entry_response_content import HarEntryResponseContent
from BrowserUpMitmProxyClient.models.har_entry_response_content import (
HarEntryResponseContent,
)
from BrowserUpMitmProxyClient.models.har_entry_timings import HarEntryTimings
from BrowserUpMitmProxyClient.models.har_log import HarLog
from BrowserUpMitmProxyClient.models.har_log_creator import HarLogCreator
from BrowserUpMitmProxyClient.models.header import Header
from BrowserUpMitmProxyClient.models.largest_contentful_paint import LargestContentfulPaint
from BrowserUpMitmProxyClient.models.largest_contentful_paint import (
LargestContentfulPaint,
)
from BrowserUpMitmProxyClient.models.match_criteria import MatchCriteria
from BrowserUpMitmProxyClient.models.name_value_pair import NameValuePair
from BrowserUpMitmProxyClient.models.page import Page
Expand Down
1 change: 0 additions & 1 deletion clients/python/BrowserUpMitmProxyClient/api/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,3 @@

# import apis into api package
from BrowserUpMitmProxyClient.api.browser_up_proxy_api import BrowserUpProxyApi

Loading
Loading