How to use the pybatfish.__version__ function in pybatfish

To help you get started, we’ve selected a few pybatfish examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github batfish / batfish / projects / pybatfish / setup.py View on Github external
from os import path
import pybatfish

here = path.abspath(path.dirname(__file__))

# Get the long description from the README file
with open(path.join(here, 'README.rst'), encoding='utf-8') as f:
    long_description = f.read()

setup(
    name=pybatfish.__name__,

    # Versions should comply with PEP440.  For a discussion on single-sourcing
    # the version across setup.py and the project code, see
    # https://packaging.python.org/en/latest/single_source_version.html
    version=pybatfish.__version__,

    description=pybatfish.__desc__,
    long_description=long_description,

    # The project's main homepage.
    url=pybatfish.__url__,

    # Author details
    author='Ari Fogel',
    author_email='pybatfish-dev@intentionet.com',

    # Choose your license
    license='Apache 2.0',

    # See https://pypi.python.org/pypi?%3Aaction=list_classifiers
    classifiers=[
github batfish / batfish / projects / pybatfish / pybatfish / client / resthelper.py View on Github external
def _post_data(session, resource, jsonData, stream=False):
    jsonData[CoordConsts.SVC_VERSION_KEY] = pybatfish.__version__
    multipart_data = MultipartEncoder(jsonData)
    
    numTriesLeft = Options.max_tries_to_coonnect_to_coordinator
    numTries = 0
    while (numTriesLeft > 0):
        numTries = numTries + 1
        numTriesLeft = numTriesLeft - 1
        try:
            response = requests.post(
                session.get_url(resource), 
                data=multipart_data, 
                verify=session.verifySslCerts,
                stream=stream,
                headers={'Content-Type': multipart_data.content_type},
                #uncomment line below if you want http capture by fiddler
                #proxies = {'http': 'http://127.0.0.1:8888', 'https': 'http://127.0.0.1:8888'}