From db627e08cc43a26d7c3f999764ef51f8b9454b0a Mon Sep 17 00:00:00 2001 From: Chris Lunsford Date: Thu, 20 Jun 2024 00:24:42 -0400 Subject: [PATCH 01/22] Initial project retooling --- .flake8 | 24 - .ruff.toml | 25 - .travis.yml | 30 - MANIFEST.in | 4 - Pipfile | 17 - Pipfile.lock | 921 ---------------------- poetry.lock | 960 +++++++++++++++++++++++ pyproject.toml | 87 +++ pytest.ini | 5 - requirements.lock | 70 -- requirements.txt | 7 - setup.cfg | 5 - setup.py | 86 -- versioneer.py | 1903 --------------------------------------------- 14 files changed, 1047 insertions(+), 3097 deletions(-) delete mode 100644 .flake8 delete mode 100644 .ruff.toml delete mode 100644 .travis.yml delete mode 100644 MANIFEST.in delete mode 100644 Pipfile delete mode 100644 Pipfile.lock create mode 100644 poetry.lock create mode 100644 pyproject.toml delete mode 100644 pytest.ini delete mode 100644 requirements.lock delete mode 100644 requirements.txt delete mode 100644 setup.cfg delete mode 100644 setup.py delete mode 100644 versioneer.py diff --git a/.flake8 b/.flake8 deleted file mode 100644 index af6b616..0000000 --- a/.flake8 +++ /dev/null @@ -1,24 +0,0 @@ -[flake8] -ignore = - # E402 module level import not at top of file - E402, - # F401 'builtins.*' imported but unused - F401, - # F403 'from builtins import *' used; unable to detect undefined names - F403, - # F405 'unicode' may be undefined, or defined from star imports: builtins - F405, - # W503 line break before binary operator - W503, -exclude = - __pycache__, - .git/, - .idea/, - .venv/, - .vscode/, - dist/, - docs/conf.py, - generator/templates/, - venv/, - versioneer.py, - webexteamssdk/_version.py, diff --git a/.ruff.toml b/.ruff.toml deleted file mode 100644 index 9a6714f..0000000 --- a/.ruff.toml +++ /dev/null @@ -1,25 +0,0 @@ -line-length = 79 - - -extend-exclude = [ - "versioneer.py", - "webexteamssdk/_version.py", - "generator/**", -] - -[lint] -# B: flake8-bugbear -# Q: flake8-quotes -extend-select = [ "B", "Q", "W" ] - -ignore-init-module-imports = true -ignore = [ - # E402 module level import not at top of file - "E402", - # F401 'builtins.*' imported but unused - "F401", - # F403 'from builtins import *' used; unable to detect undefined names - "F403", - # F405 'unicode' may be undefined, or defined from star imports: builtins - "F405", -] diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index ec5553f..0000000 --- a/.travis.yml +++ /dev/null @@ -1,30 +0,0 @@ -language: python -cache: pip - -install: script/setup - -jobs: - include: - - name: "Lint" - python: 3.8 - script: script/test lint - - - name: "Tests on Python 2.7" - python: 2.7 - script: script/ci - - - name: "Tests on Python 3.5" - python: 3.5 - script: script/ci - - - name: "Tests on Python 3.6" - python: 3.6 - script: script/ci - - - name: "Tests on Python 3.7" - python: 3.7 - script: script/ci - - - name: "Tests on Python 3.8" - python: 3.8 - script: script/ci diff --git a/MANIFEST.in b/MANIFEST.in deleted file mode 100644 index 034c963..0000000 --- a/MANIFEST.in +++ /dev/null @@ -1,4 +0,0 @@ -include LICENSE.txt -include README.rst -include versioneer.py -include webexteamssdk/_version.py diff --git a/Pipfile b/Pipfile deleted file mode 100644 index ec39e52..0000000 --- a/Pipfile +++ /dev/null @@ -1,17 +0,0 @@ -[[source]] -url = "https://pypi.python.org/simple" -verify_ssl = true -name = "pypi" - -[packages] -webexteamssdk = {editable = true,path = "."} - -[dev-packages] -versioneer = "*" -sphinx = ">=1.8.0" -sphinx-rtd-theme = "*" -pytest = "*" -flake8 = "*" -twine = "*" -ipython = "*" -pyyaml = "*" diff --git a/Pipfile.lock b/Pipfile.lock deleted file mode 100644 index 7fdbaf7..0000000 --- a/Pipfile.lock +++ /dev/null @@ -1,921 +0,0 @@ -{ - "_meta": { - "hash": { - "sha256": "1ea57274034c50d8f1cc643603390a0d48c15f3fe45cdd5eb1c60403c4a3b40b" - }, - "pipfile-spec": 6, - "requires": {}, - "sources": [ - { - "name": "pypi", - "url": "https://pypi.python.org/simple", - "verify_ssl": true - } - ] - }, - "default": { - "certifi": { - "hashes": [ - "sha256:0569859f95fc761b18b45ef421b1290a0f65f147e92a1e5eb3e635f9a5e4e66f", - "sha256:dc383c07b76109f368f6106eee2b593b04a011ea4d55f652c6ca24a754d1cdd1" - ], - "markers": "python_version >= '3.6'", - "version": "==2024.2.2" - }, - "charset-normalizer": { - "hashes": [ - "sha256:06435b539f889b1f6f4ac1758871aae42dc3a8c0e24ac9e60c2384973ad73027", - "sha256:06a81e93cd441c56a9b65d8e1d043daeb97a3d0856d177d5c90ba85acb3db087", - "sha256:0a55554a2fa0d408816b3b5cedf0045f4b8e1a6065aec45849de2d6f3f8e9786", - "sha256:0b2b64d2bb6d3fb9112bafa732def486049e63de9618b5843bcdd081d8144cd8", - "sha256:10955842570876604d404661fbccbc9c7e684caf432c09c715ec38fbae45ae09", - "sha256:122c7fa62b130ed55f8f285bfd56d5f4b4a5b503609d181f9ad85e55c89f4185", - "sha256:1ceae2f17a9c33cb48e3263960dc5fc8005351ee19db217e9b1bb15d28c02574", - "sha256:1d3193f4a680c64b4b6a9115943538edb896edc190f0b222e73761716519268e", - "sha256:1f79682fbe303db92bc2b1136016a38a42e835d932bab5b3b1bfcfbf0640e519", - "sha256:2127566c664442652f024c837091890cb1942c30937add288223dc895793f898", - "sha256:22afcb9f253dac0696b5a4be4a1c0f8762f8239e21b99680099abd9b2b1b2269", - "sha256:25baf083bf6f6b341f4121c2f3c548875ee6f5339300e08be3f2b2ba1721cdd3", - "sha256:2e81c7b9c8979ce92ed306c249d46894776a909505d8f5a4ba55b14206e3222f", - "sha256:3287761bc4ee9e33561a7e058c72ac0938c4f57fe49a09eae428fd88aafe7bb6", - "sha256:34d1c8da1e78d2e001f363791c98a272bb734000fcef47a491c1e3b0505657a8", - "sha256:37e55c8e51c236f95b033f6fb391d7d7970ba5fe7ff453dad675e88cf303377a", - "sha256:3d47fa203a7bd9c5b6cee4736ee84ca03b8ef23193c0d1ca99b5089f72645c73", - "sha256:3e4d1f6587322d2788836a99c69062fbb091331ec940e02d12d179c1d53e25fc", - "sha256:42cb296636fcc8b0644486d15c12376cb9fa75443e00fb25de0b8602e64c1714", - "sha256:45485e01ff4d3630ec0d9617310448a8702f70e9c01906b0d0118bdf9d124cf2", - "sha256:4a78b2b446bd7c934f5dcedc588903fb2f5eec172f3d29e52a9096a43722adfc", - "sha256:4ab2fe47fae9e0f9dee8c04187ce5d09f48eabe611be8259444906793ab7cbce", - "sha256:4d0d1650369165a14e14e1e47b372cfcb31d6ab44e6e33cb2d4e57265290044d", - "sha256:549a3a73da901d5bc3ce8d24e0600d1fa85524c10287f6004fbab87672bf3e1e", - "sha256:55086ee1064215781fff39a1af09518bc9255b50d6333f2e4c74ca09fac6a8f6", - "sha256:572c3763a264ba47b3cf708a44ce965d98555f618ca42c926a9c1616d8f34269", - "sha256:573f6eac48f4769d667c4442081b1794f52919e7edada77495aaed9236d13a96", - "sha256:5b4c145409bef602a690e7cfad0a15a55c13320ff7a3ad7ca59c13bb8ba4d45d", - "sha256:6463effa3186ea09411d50efc7d85360b38d5f09b870c48e4600f63af490e56a", - "sha256:65f6f63034100ead094b8744b3b97965785388f308a64cf8d7c34f2f2e5be0c4", - "sha256:663946639d296df6a2bb2aa51b60a2454ca1cb29835324c640dafb5ff2131a77", - "sha256:6897af51655e3691ff853668779c7bad41579facacf5fd7253b0133308cf000d", - "sha256:68d1f8a9e9e37c1223b656399be5d6b448dea850bed7d0f87a8311f1ff3dabb0", - "sha256:6ac7ffc7ad6d040517be39eb591cac5ff87416c2537df6ba3cba3bae290c0fed", - "sha256:6b3251890fff30ee142c44144871185dbe13b11bab478a88887a639655be1068", - "sha256:6c4caeef8fa63d06bd437cd4bdcf3ffefe6738fb1b25951440d80dc7df8c03ac", - "sha256:6ef1d82a3af9d3eecdba2321dc1b3c238245d890843e040e41e470ffa64c3e25", - "sha256:753f10e867343b4511128c6ed8c82f7bec3bd026875576dfd88483c5c73b2fd8", - "sha256:7cd13a2e3ddeed6913a65e66e94b51d80a041145a026c27e6bb76c31a853c6ab", - "sha256:7ed9e526742851e8d5cc9e6cf41427dfc6068d4f5a3bb03659444b4cabf6bc26", - "sha256:7f04c839ed0b6b98b1a7501a002144b76c18fb1c1850c8b98d458ac269e26ed2", - "sha256:802fe99cca7457642125a8a88a084cef28ff0cf9407060f7b93dca5aa25480db", - "sha256:80402cd6ee291dcb72644d6eac93785fe2c8b9cb30893c1af5b8fdd753b9d40f", - "sha256:8465322196c8b4d7ab6d1e049e4c5cb460d0394da4a27d23cc242fbf0034b6b5", - "sha256:86216b5cee4b06df986d214f664305142d9c76df9b6512be2738aa72a2048f99", - "sha256:87d1351268731db79e0f8e745d92493ee2841c974128ef629dc518b937d9194c", - "sha256:8bdb58ff7ba23002a4c5808d608e4e6c687175724f54a5dade5fa8c67b604e4d", - "sha256:8c622a5fe39a48f78944a87d4fb8a53ee07344641b0562c540d840748571b811", - "sha256:8d756e44e94489e49571086ef83b2bb8ce311e730092d2c34ca8f7d925cb20aa", - "sha256:8f4a014bc36d3c57402e2977dada34f9c12300af536839dc38c0beab8878f38a", - "sha256:9063e24fdb1e498ab71cb7419e24622516c4a04476b17a2dab57e8baa30d6e03", - "sha256:90d558489962fd4918143277a773316e56c72da56ec7aa3dc3dbbe20fdfed15b", - "sha256:923c0c831b7cfcb071580d3f46c4baf50f174be571576556269530f4bbd79d04", - "sha256:95f2a5796329323b8f0512e09dbb7a1860c46a39da62ecb2324f116fa8fdc85c", - "sha256:96b02a3dc4381e5494fad39be677abcb5e6634bf7b4fa83a6dd3112607547001", - "sha256:9f96df6923e21816da7e0ad3fd47dd8f94b2a5ce594e00677c0013018b813458", - "sha256:a10af20b82360ab00827f916a6058451b723b4e65030c5a18577c8b2de5b3389", - "sha256:a50aebfa173e157099939b17f18600f72f84eed3049e743b68ad15bd69b6bf99", - "sha256:a981a536974bbc7a512cf44ed14938cf01030a99e9b3a06dd59578882f06f985", - "sha256:a9a8e9031d613fd2009c182b69c7b2c1ef8239a0efb1df3f7c8da66d5dd3d537", - "sha256:ae5f4161f18c61806f411a13b0310bea87f987c7d2ecdbdaad0e94eb2e404238", - "sha256:aed38f6e4fb3f5d6bf81bfa990a07806be9d83cf7bacef998ab1a9bd660a581f", - "sha256:b01b88d45a6fcb69667cd6d2f7a9aeb4bf53760d7fc536bf679ec94fe9f3ff3d", - "sha256:b261ccdec7821281dade748d088bb6e9b69e6d15b30652b74cbbac25e280b796", - "sha256:b2b0a0c0517616b6869869f8c581d4eb2dd83a4d79e0ebcb7d373ef9956aeb0a", - "sha256:b4a23f61ce87adf89be746c8a8974fe1c823c891d8f86eb218bb957c924bb143", - "sha256:bd8f7df7d12c2db9fab40bdd87a7c09b1530128315d047a086fa3ae3435cb3a8", - "sha256:beb58fe5cdb101e3a055192ac291b7a21e3b7ef4f67fa1d74e331a7f2124341c", - "sha256:c002b4ffc0be611f0d9da932eb0f704fe2602a9a949d1f738e4c34c75b0863d5", - "sha256:c083af607d2515612056a31f0a8d9e0fcb5876b7bfc0abad3ecd275bc4ebc2d5", - "sha256:c180f51afb394e165eafe4ac2936a14bee3eb10debc9d9e4db8958fe36afe711", - "sha256:c235ebd9baae02f1b77bcea61bce332cb4331dc3617d254df3323aa01ab47bd4", - "sha256:cd70574b12bb8a4d2aaa0094515df2463cb429d8536cfb6c7ce983246983e5a6", - "sha256:d0eccceffcb53201b5bfebb52600a5fb483a20b61da9dbc885f8b103cbe7598c", - "sha256:d965bba47ddeec8cd560687584e88cf699fd28f192ceb452d1d7ee807c5597b7", - "sha256:db364eca23f876da6f9e16c9da0df51aa4f104a972735574842618b8c6d999d4", - "sha256:ddbb2551d7e0102e7252db79ba445cdab71b26640817ab1e3e3648dad515003b", - "sha256:deb6be0ac38ece9ba87dea880e438f25ca3eddfac8b002a2ec3d9183a454e8ae", - "sha256:e06ed3eb3218bc64786f7db41917d4e686cc4856944f53d5bdf83a6884432e12", - "sha256:e27ad930a842b4c5eb8ac0016b0a54f5aebbe679340c26101df33424142c143c", - "sha256:e537484df0d8f426ce2afb2d0f8e1c3d0b114b83f8850e5f2fbea0e797bd82ae", - "sha256:eb00ed941194665c332bf8e078baf037d6c35d7c4f3102ea2d4f16ca94a26dc8", - "sha256:eb6904c354526e758fda7167b33005998fb68c46fbc10e013ca97f21ca5c8887", - "sha256:eb8821e09e916165e160797a6c17edda0679379a4be5c716c260e836e122f54b", - "sha256:efcb3f6676480691518c177e3b465bcddf57cea040302f9f4e6e191af91174d4", - "sha256:f27273b60488abe721a075bcca6d7f3964f9f6f067c8c4c605743023d7d3944f", - "sha256:f30c3cb33b24454a82faecaf01b19c18562b1e89558fb6c56de4d9118a032fd5", - "sha256:fb69256e180cb6c8a894fee62b3afebae785babc1ee98b81cdf68bbca1987f33", - "sha256:fd1abc0d89e30cc4e02e4064dc67fcc51bd941eb395c502aac3ec19fab46b519", - "sha256:ff8fa367d09b717b2a17a052544193ad76cd49979c805768879cb63d9ca50561" - ], - "markers": "python_full_version >= '3.7.0'", - "version": "==3.3.2" - }, - "future": { - "hashes": [ - "sha256:929292d34f5872e70396626ef385ec22355a1fae8ad29e1a734c3e43f9fbc216", - "sha256:bd2968309307861edae1458a4f8a4f3598c03be43b97521076aebf5d94c07b05" - ], - "markers": "python_version >= '2.6' and python_version not in '3.0, 3.1, 3.2, 3.3'", - "version": "==1.0.0" - }, - "idna": { - "hashes": [ - "sha256:028ff3aadf0609c1fd278d8ea3089299412a7a8b9bd005dd08b9f8285bcb5cfc", - "sha256:82fee1fc78add43492d3a1898bfa6d8a904cc97d8427f683ed8e798d07761aa0" - ], - "markers": "python_version >= '3.5'", - "version": "==3.7" - }, - "pyjwt": { - "hashes": [ - "sha256:5c6eca3c2940464d106b99ba83b00c6add741c9becaec087fb7ccdefea71350e", - "sha256:8d59a976fb773f3e6a39c85636357c4f0e242707394cadadd9814f5cbaa20e96" - ], - "version": "==1.7.1" - }, - "requests": { - "hashes": [ - "sha256:58cd2187c01e70e6e26505bca751777aa9f2ee0b7f4300988b709f44e013003f", - "sha256:942c5a758f98d790eaed1a29cb6eefc7ffb0d1cf7af05c3d2791656dbd6ad1e1" - ], - "markers": "python_version >= '3.7'", - "version": "==2.31.0" - }, - "requests-toolbelt": { - "hashes": [ - "sha256:7681a0a3d047012b5bdc0ee37d7f8f07ebe76ab08caeccfc3921ce23c88d5bc6", - "sha256:cccfdd665f0a24fcf4726e690f65639d272bb0637b9b92dfd91a5568ccf6bd06" - ], - "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'", - "version": "==1.0.0" - }, - "urllib3": { - "hashes": [ - "sha256:450b20ec296a467077128bff42b73080516e71b56ff59a60a02bef2232c4fa9d", - "sha256:d0570876c61ab9e520d776c38acbbb5b05a776d3f9ff98a5c8fd5162a444cf19" - ], - "markers": "python_version >= '3.8'", - "version": "==2.2.1" - }, - "webexteamssdk": { - "editable": true, - "path": "." - } - }, - "develop": { - "alabaster": { - "hashes": [ - "sha256:75a8b99c28a5dad50dd7f8ccdd447a121ddb3892da9e53d1ca5cca3106d58d65", - "sha256:b46733c07dce03ae4e150330b975c75737fa60f0a7c591b6c8bf4928a28e2c92" - ], - "markers": "python_version >= '3.9'", - "version": "==0.7.16" - }, - "asttokens": { - "hashes": [ - "sha256:051ed49c3dcae8913ea7cd08e46a606dba30b79993209636c4875bc1d637bc24", - "sha256:b03869718ba9a6eb027e134bfdf69f38a236d681c83c160d510768af11254ba0" - ], - "version": "==2.4.1" - }, - "babel": { - "hashes": [ - "sha256:6919867db036398ba21eb5c7a0f6b28ab8cbc3ae7a73a44ebe34ae74a4e7d363", - "sha256:efb1a25b7118e67ce3a259bed20545c29cb68be8ad2c784c83689981b7a57287" - ], - "markers": "python_version >= '3.7'", - "version": "==2.14.0" - }, - "backports.tarfile": { - "hashes": [ - "sha256:91d59138ea401ee2a95e8b839c1e2f51f3e9ca76bdba8b6a29f8d773564686a8", - "sha256:b2f4df351db942d094db94588bbf2c6938697a5f190f44c934acc697da56008b" - ], - "markers": "python_version < '3.12'", - "version": "==1.1.0" - }, - "certifi": { - "hashes": [ - "sha256:0569859f95fc761b18b45ef421b1290a0f65f147e92a1e5eb3e635f9a5e4e66f", - "sha256:dc383c07b76109f368f6106eee2b593b04a011ea4d55f652c6ca24a754d1cdd1" - ], - "markers": "python_version >= '3.6'", - "version": "==2024.2.2" - }, - "charset-normalizer": { - "hashes": [ - "sha256:06435b539f889b1f6f4ac1758871aae42dc3a8c0e24ac9e60c2384973ad73027", - "sha256:06a81e93cd441c56a9b65d8e1d043daeb97a3d0856d177d5c90ba85acb3db087", - "sha256:0a55554a2fa0d408816b3b5cedf0045f4b8e1a6065aec45849de2d6f3f8e9786", - "sha256:0b2b64d2bb6d3fb9112bafa732def486049e63de9618b5843bcdd081d8144cd8", - "sha256:10955842570876604d404661fbccbc9c7e684caf432c09c715ec38fbae45ae09", - "sha256:122c7fa62b130ed55f8f285bfd56d5f4b4a5b503609d181f9ad85e55c89f4185", - "sha256:1ceae2f17a9c33cb48e3263960dc5fc8005351ee19db217e9b1bb15d28c02574", - "sha256:1d3193f4a680c64b4b6a9115943538edb896edc190f0b222e73761716519268e", - "sha256:1f79682fbe303db92bc2b1136016a38a42e835d932bab5b3b1bfcfbf0640e519", - "sha256:2127566c664442652f024c837091890cb1942c30937add288223dc895793f898", - "sha256:22afcb9f253dac0696b5a4be4a1c0f8762f8239e21b99680099abd9b2b1b2269", - "sha256:25baf083bf6f6b341f4121c2f3c548875ee6f5339300e08be3f2b2ba1721cdd3", - "sha256:2e81c7b9c8979ce92ed306c249d46894776a909505d8f5a4ba55b14206e3222f", - "sha256:3287761bc4ee9e33561a7e058c72ac0938c4f57fe49a09eae428fd88aafe7bb6", - "sha256:34d1c8da1e78d2e001f363791c98a272bb734000fcef47a491c1e3b0505657a8", - "sha256:37e55c8e51c236f95b033f6fb391d7d7970ba5fe7ff453dad675e88cf303377a", - "sha256:3d47fa203a7bd9c5b6cee4736ee84ca03b8ef23193c0d1ca99b5089f72645c73", - "sha256:3e4d1f6587322d2788836a99c69062fbb091331ec940e02d12d179c1d53e25fc", - "sha256:42cb296636fcc8b0644486d15c12376cb9fa75443e00fb25de0b8602e64c1714", - "sha256:45485e01ff4d3630ec0d9617310448a8702f70e9c01906b0d0118bdf9d124cf2", - "sha256:4a78b2b446bd7c934f5dcedc588903fb2f5eec172f3d29e52a9096a43722adfc", - "sha256:4ab2fe47fae9e0f9dee8c04187ce5d09f48eabe611be8259444906793ab7cbce", - "sha256:4d0d1650369165a14e14e1e47b372cfcb31d6ab44e6e33cb2d4e57265290044d", - "sha256:549a3a73da901d5bc3ce8d24e0600d1fa85524c10287f6004fbab87672bf3e1e", - "sha256:55086ee1064215781fff39a1af09518bc9255b50d6333f2e4c74ca09fac6a8f6", - "sha256:572c3763a264ba47b3cf708a44ce965d98555f618ca42c926a9c1616d8f34269", - "sha256:573f6eac48f4769d667c4442081b1794f52919e7edada77495aaed9236d13a96", - "sha256:5b4c145409bef602a690e7cfad0a15a55c13320ff7a3ad7ca59c13bb8ba4d45d", - "sha256:6463effa3186ea09411d50efc7d85360b38d5f09b870c48e4600f63af490e56a", - "sha256:65f6f63034100ead094b8744b3b97965785388f308a64cf8d7c34f2f2e5be0c4", - "sha256:663946639d296df6a2bb2aa51b60a2454ca1cb29835324c640dafb5ff2131a77", - "sha256:6897af51655e3691ff853668779c7bad41579facacf5fd7253b0133308cf000d", - "sha256:68d1f8a9e9e37c1223b656399be5d6b448dea850bed7d0f87a8311f1ff3dabb0", - "sha256:6ac7ffc7ad6d040517be39eb591cac5ff87416c2537df6ba3cba3bae290c0fed", - "sha256:6b3251890fff30ee142c44144871185dbe13b11bab478a88887a639655be1068", - "sha256:6c4caeef8fa63d06bd437cd4bdcf3ffefe6738fb1b25951440d80dc7df8c03ac", - "sha256:6ef1d82a3af9d3eecdba2321dc1b3c238245d890843e040e41e470ffa64c3e25", - "sha256:753f10e867343b4511128c6ed8c82f7bec3bd026875576dfd88483c5c73b2fd8", - "sha256:7cd13a2e3ddeed6913a65e66e94b51d80a041145a026c27e6bb76c31a853c6ab", - "sha256:7ed9e526742851e8d5cc9e6cf41427dfc6068d4f5a3bb03659444b4cabf6bc26", - "sha256:7f04c839ed0b6b98b1a7501a002144b76c18fb1c1850c8b98d458ac269e26ed2", - "sha256:802fe99cca7457642125a8a88a084cef28ff0cf9407060f7b93dca5aa25480db", - "sha256:80402cd6ee291dcb72644d6eac93785fe2c8b9cb30893c1af5b8fdd753b9d40f", - "sha256:8465322196c8b4d7ab6d1e049e4c5cb460d0394da4a27d23cc242fbf0034b6b5", - "sha256:86216b5cee4b06df986d214f664305142d9c76df9b6512be2738aa72a2048f99", - "sha256:87d1351268731db79e0f8e745d92493ee2841c974128ef629dc518b937d9194c", - "sha256:8bdb58ff7ba23002a4c5808d608e4e6c687175724f54a5dade5fa8c67b604e4d", - "sha256:8c622a5fe39a48f78944a87d4fb8a53ee07344641b0562c540d840748571b811", - "sha256:8d756e44e94489e49571086ef83b2bb8ce311e730092d2c34ca8f7d925cb20aa", - "sha256:8f4a014bc36d3c57402e2977dada34f9c12300af536839dc38c0beab8878f38a", - "sha256:9063e24fdb1e498ab71cb7419e24622516c4a04476b17a2dab57e8baa30d6e03", - "sha256:90d558489962fd4918143277a773316e56c72da56ec7aa3dc3dbbe20fdfed15b", - "sha256:923c0c831b7cfcb071580d3f46c4baf50f174be571576556269530f4bbd79d04", - "sha256:95f2a5796329323b8f0512e09dbb7a1860c46a39da62ecb2324f116fa8fdc85c", - "sha256:96b02a3dc4381e5494fad39be677abcb5e6634bf7b4fa83a6dd3112607547001", - "sha256:9f96df6923e21816da7e0ad3fd47dd8f94b2a5ce594e00677c0013018b813458", - "sha256:a10af20b82360ab00827f916a6058451b723b4e65030c5a18577c8b2de5b3389", - "sha256:a50aebfa173e157099939b17f18600f72f84eed3049e743b68ad15bd69b6bf99", - "sha256:a981a536974bbc7a512cf44ed14938cf01030a99e9b3a06dd59578882f06f985", - "sha256:a9a8e9031d613fd2009c182b69c7b2c1ef8239a0efb1df3f7c8da66d5dd3d537", - "sha256:ae5f4161f18c61806f411a13b0310bea87f987c7d2ecdbdaad0e94eb2e404238", - "sha256:aed38f6e4fb3f5d6bf81bfa990a07806be9d83cf7bacef998ab1a9bd660a581f", - "sha256:b01b88d45a6fcb69667cd6d2f7a9aeb4bf53760d7fc536bf679ec94fe9f3ff3d", - "sha256:b261ccdec7821281dade748d088bb6e9b69e6d15b30652b74cbbac25e280b796", - "sha256:b2b0a0c0517616b6869869f8c581d4eb2dd83a4d79e0ebcb7d373ef9956aeb0a", - "sha256:b4a23f61ce87adf89be746c8a8974fe1c823c891d8f86eb218bb957c924bb143", - "sha256:bd8f7df7d12c2db9fab40bdd87a7c09b1530128315d047a086fa3ae3435cb3a8", - "sha256:beb58fe5cdb101e3a055192ac291b7a21e3b7ef4f67fa1d74e331a7f2124341c", - "sha256:c002b4ffc0be611f0d9da932eb0f704fe2602a9a949d1f738e4c34c75b0863d5", - "sha256:c083af607d2515612056a31f0a8d9e0fcb5876b7bfc0abad3ecd275bc4ebc2d5", - "sha256:c180f51afb394e165eafe4ac2936a14bee3eb10debc9d9e4db8958fe36afe711", - "sha256:c235ebd9baae02f1b77bcea61bce332cb4331dc3617d254df3323aa01ab47bd4", - "sha256:cd70574b12bb8a4d2aaa0094515df2463cb429d8536cfb6c7ce983246983e5a6", - "sha256:d0eccceffcb53201b5bfebb52600a5fb483a20b61da9dbc885f8b103cbe7598c", - "sha256:d965bba47ddeec8cd560687584e88cf699fd28f192ceb452d1d7ee807c5597b7", - "sha256:db364eca23f876da6f9e16c9da0df51aa4f104a972735574842618b8c6d999d4", - "sha256:ddbb2551d7e0102e7252db79ba445cdab71b26640817ab1e3e3648dad515003b", - "sha256:deb6be0ac38ece9ba87dea880e438f25ca3eddfac8b002a2ec3d9183a454e8ae", - "sha256:e06ed3eb3218bc64786f7db41917d4e686cc4856944f53d5bdf83a6884432e12", - "sha256:e27ad930a842b4c5eb8ac0016b0a54f5aebbe679340c26101df33424142c143c", - "sha256:e537484df0d8f426ce2afb2d0f8e1c3d0b114b83f8850e5f2fbea0e797bd82ae", - "sha256:eb00ed941194665c332bf8e078baf037d6c35d7c4f3102ea2d4f16ca94a26dc8", - "sha256:eb6904c354526e758fda7167b33005998fb68c46fbc10e013ca97f21ca5c8887", - "sha256:eb8821e09e916165e160797a6c17edda0679379a4be5c716c260e836e122f54b", - "sha256:efcb3f6676480691518c177e3b465bcddf57cea040302f9f4e6e191af91174d4", - "sha256:f27273b60488abe721a075bcca6d7f3964f9f6f067c8c4c605743023d7d3944f", - "sha256:f30c3cb33b24454a82faecaf01b19c18562b1e89558fb6c56de4d9118a032fd5", - "sha256:fb69256e180cb6c8a894fee62b3afebae785babc1ee98b81cdf68bbca1987f33", - "sha256:fd1abc0d89e30cc4e02e4064dc67fcc51bd941eb395c502aac3ec19fab46b519", - "sha256:ff8fa367d09b717b2a17a052544193ad76cd49979c805768879cb63d9ca50561" - ], - "markers": "python_full_version >= '3.7.0'", - "version": "==3.3.2" - }, - "decorator": { - "hashes": [ - "sha256:637996211036b6385ef91435e4fae22989472f9d571faba8927ba8253acbc330", - "sha256:b8c3f85900b9dc423225913c5aace94729fe1fa9763b38939a95226f02d37186" - ], - "markers": "python_version >= '3.5'", - "version": "==5.1.1" - }, - "docutils": { - "hashes": [ - "sha256:96f387a2c5562db4476f09f13bbab2192e764cac08ebbf3a34a95d9b1e4a59d6", - "sha256:f08a4e276c3a1583a86dce3e34aba3fe04d02bba2dd51ed16106244e8a923e3b" - ], - "markers": "python_version >= '3.7'", - "version": "==0.20.1" - }, - "exceptiongroup": { - "hashes": [ - "sha256:4bfd3996ac73b41e9b9628b04e079f193850720ea5945fc96a08633c66912f14", - "sha256:91f5c769735f051a4290d52edd0858999b57e5876e9f85937691bd4c9fa3ed68" - ], - "markers": "python_version < '3.11'", - "version": "==1.2.0" - }, - "executing": { - "hashes": [ - "sha256:35afe2ce3affba8ee97f2d69927fa823b08b472b7b994e36a52a964b93d16147", - "sha256:eac49ca94516ccc753f9fb5ce82603156e590b27525a8bc32cce8ae302eb61bc" - ], - "markers": "python_version >= '3.5'", - "version": "==2.0.1" - }, - "flake8": { - "hashes": [ - "sha256:33f96621059e65eec474169085dc92bf26e7b2d47366b70be2f67ab80dc25132", - "sha256:a6dfbb75e03252917f2473ea9653f7cd799c3064e54d4c8140044c5c065f53c3" - ], - "index": "pypi", - "markers": "python_full_version >= '3.8.1'", - "version": "==7.0.0" - }, - "idna": { - "hashes": [ - "sha256:028ff3aadf0609c1fd278d8ea3089299412a7a8b9bd005dd08b9f8285bcb5cfc", - "sha256:82fee1fc78add43492d3a1898bfa6d8a904cc97d8427f683ed8e798d07761aa0" - ], - "markers": "python_version >= '3.5'", - "version": "==3.7" - }, - "imagesize": { - "hashes": [ - "sha256:0d8d18d08f840c19d0ee7ca1fd82490fdc3729b7ac93f49870406ddde8ef8d8b", - "sha256:69150444affb9cb0d5cc5a92b3676f0b2fb7cd9ae39e947a5e11a36b4497cd4a" - ], - "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'", - "version": "==1.4.1" - }, - "importlib-metadata": { - "hashes": [ - "sha256:30962b96c0c223483ed6cc7280e7f0199feb01a0e40cfae4d4450fc6fab1f570", - "sha256:b78938b926ee8d5f020fc4772d487045805a55ddbad2ecf21c6d60938dc7fcd2" - ], - "markers": "python_version >= '3.8'", - "version": "==7.1.0" - }, - "iniconfig": { - "hashes": [ - "sha256:2d91e135bf72d31a410b17c16da610a82cb55f6b0477d1a902134b24a455b8b3", - "sha256:b6a85871a79d2e3b22d2d1b94ac2824226a63c6b741c88f7ae975f18b6778374" - ], - "markers": "python_version >= '3.7'", - "version": "==2.0.0" - }, - "ipython": { - "hashes": [ - "sha256:07232af52a5ba146dc3372c7bf52a0f890a23edf38d77caef8d53f9cdc2584c1", - "sha256:7468edaf4f6de3e1b912e57f66c241e6fd3c7099f2ec2136e239e142e800274d" - ], - "index": "pypi", - "markers": "python_version >= '3.10'", - "version": "==8.23.0" - }, - "jaraco.classes": { - "hashes": [ - "sha256:47a024b51d0239c0dd8c8540c6c7f484be3b8fcf0b2d85c13825780d3b3f3acd", - "sha256:f662826b6bed8cace05e7ff873ce0f9283b5c924470fe664fff1c2f00f581790" - ], - "markers": "python_version >= '3.8'", - "version": "==3.4.0" - }, - "jaraco.context": { - "hashes": [ - "sha256:3e16388f7da43d384a1a7cd3452e72e14732ac9fe459678773a3608a812bf266", - "sha256:c2f67165ce1f9be20f32f650f25d8edfc1646a8aeee48ae06fb35f90763576d2" - ], - "markers": "python_version >= '3.8'", - "version": "==5.3.0" - }, - "jaraco.functools": { - "hashes": [ - "sha256:c279cb24c93d694ef7270f970d499cab4d3813f4e08273f95398651a634f0925", - "sha256:daf276ddf234bea897ef14f43c4e1bf9eefeac7b7a82a4dd69228ac20acff68d" - ], - "markers": "python_version >= '3.8'", - "version": "==4.0.0" - }, - "jedi": { - "hashes": [ - "sha256:cf0496f3651bc65d7174ac1b7d043eff454892c708a87d1b683e57b569927ffd", - "sha256:e983c654fe5c02867aef4cdfce5a2fbb4a50adc0af145f70504238f18ef5e7e0" - ], - "markers": "python_version >= '3.6'", - "version": "==0.19.1" - }, - "jinja2": { - "hashes": [ - "sha256:7d6d50dd97d52cbc355597bd845fabfbac3f551e1f99619e39a35ce8c370b5fa", - "sha256:ac8bd6544d4bb2c9792bf3a159e80bba8fda7f07e81bc3aed565432d5925ba90" - ], - "markers": "python_version >= '3.7'", - "version": "==3.1.3" - }, - "keyring": { - "hashes": [ - "sha256:26fc12e6a329d61d24aa47b22a7c5c3f35753df7d8f2860973cf94f4e1fb3427", - "sha256:7230ea690525133f6ad536a9b5def74a4bd52642abe594761028fc044d7c7893" - ], - "markers": "python_version >= '3.8'", - "version": "==25.1.0" - }, - "markdown-it-py": { - "hashes": [ - "sha256:355216845c60bd96232cd8d8c40e8f9765cc86f46880e43a8fd22dc1a1a8cab1", - "sha256:e3f60a94fa066dc52ec76661e37c851cb232d92f9886b15cb560aaada2df8feb" - ], - "markers": "python_version >= '3.8'", - "version": "==3.0.0" - }, - "markupsafe": { - "hashes": [ - "sha256:00e046b6dd71aa03a41079792f8473dc494d564611a8f89bbbd7cb93295ebdcf", - "sha256:075202fa5b72c86ad32dc7d0b56024ebdbcf2048c0ba09f1cde31bfdd57bcfff", - "sha256:0e397ac966fdf721b2c528cf028494e86172b4feba51d65f81ffd65c63798f3f", - "sha256:17b950fccb810b3293638215058e432159d2b71005c74371d784862b7e4683f3", - "sha256:1f3fbcb7ef1f16e48246f704ab79d79da8a46891e2da03f8783a5b6fa41a9532", - "sha256:2174c595a0d73a3080ca3257b40096db99799265e1c27cc5a610743acd86d62f", - "sha256:2b7c57a4dfc4f16f7142221afe5ba4e093e09e728ca65c51f5620c9aaeb9a617", - "sha256:2d2d793e36e230fd32babe143b04cec8a8b3eb8a3122d2aceb4a371e6b09b8df", - "sha256:30b600cf0a7ac9234b2638fbc0fb6158ba5bdcdf46aeb631ead21248b9affbc4", - "sha256:397081c1a0bfb5124355710fe79478cdbeb39626492b15d399526ae53422b906", - "sha256:3a57fdd7ce31c7ff06cdfbf31dafa96cc533c21e443d57f5b1ecc6cdc668ec7f", - "sha256:3c6b973f22eb18a789b1460b4b91bf04ae3f0c4234a0a6aa6b0a92f6f7b951d4", - "sha256:3e53af139f8579a6d5f7b76549125f0d94d7e630761a2111bc431fd820e163b8", - "sha256:4096e9de5c6fdf43fb4f04c26fb114f61ef0bf2e5604b6ee3019d51b69e8c371", - "sha256:4275d846e41ecefa46e2015117a9f491e57a71ddd59bbead77e904dc02b1bed2", - "sha256:4c31f53cdae6ecfa91a77820e8b151dba54ab528ba65dfd235c80b086d68a465", - "sha256:4f11aa001c540f62c6166c7726f71f7573b52c68c31f014c25cc7901deea0b52", - "sha256:5049256f536511ee3f7e1b3f87d1d1209d327e818e6ae1365e8653d7e3abb6a6", - "sha256:58c98fee265677f63a4385256a6d7683ab1832f3ddd1e66fe948d5880c21a169", - "sha256:598e3276b64aff0e7b3451b72e94fa3c238d452e7ddcd893c3ab324717456bad", - "sha256:5b7b716f97b52c5a14bffdf688f971b2d5ef4029127f1ad7a513973cfd818df2", - "sha256:5dedb4db619ba5a2787a94d877bc8ffc0566f92a01c0ef214865e54ecc9ee5e0", - "sha256:619bc166c4f2de5caa5a633b8b7326fbe98e0ccbfacabd87268a2b15ff73a029", - "sha256:629ddd2ca402ae6dbedfceeba9c46d5f7b2a61d9749597d4307f943ef198fc1f", - "sha256:656f7526c69fac7f600bd1f400991cc282b417d17539a1b228617081106feb4a", - "sha256:6ec585f69cec0aa07d945b20805be741395e28ac1627333b1c5b0105962ffced", - "sha256:72b6be590cc35924b02c78ef34b467da4ba07e4e0f0454a2c5907f473fc50ce5", - "sha256:7502934a33b54030eaf1194c21c692a534196063db72176b0c4028e140f8f32c", - "sha256:7a68b554d356a91cce1236aa7682dc01df0edba8d043fd1ce607c49dd3c1edcf", - "sha256:7b2e5a267c855eea6b4283940daa6e88a285f5f2a67f2220203786dfa59b37e9", - "sha256:823b65d8706e32ad2df51ed89496147a42a2a6e01c13cfb6ffb8b1e92bc910bb", - "sha256:8590b4ae07a35970728874632fed7bd57b26b0102df2d2b233b6d9d82f6c62ad", - "sha256:8dd717634f5a044f860435c1d8c16a270ddf0ef8588d4887037c5028b859b0c3", - "sha256:8dec4936e9c3100156f8a2dc89c4b88d5c435175ff03413b443469c7c8c5f4d1", - "sha256:97cafb1f3cbcd3fd2b6fbfb99ae11cdb14deea0736fc2b0952ee177f2b813a46", - "sha256:a17a92de5231666cfbe003f0e4b9b3a7ae3afb1ec2845aadc2bacc93ff85febc", - "sha256:a549b9c31bec33820e885335b451286e2969a2d9e24879f83fe904a5ce59d70a", - "sha256:ac07bad82163452a6884fe8fa0963fb98c2346ba78d779ec06bd7a6262132aee", - "sha256:ae2ad8ae6ebee9d2d94b17fb62763125f3f374c25618198f40cbb8b525411900", - "sha256:b91c037585eba9095565a3556f611e3cbfaa42ca1e865f7b8015fe5c7336d5a5", - "sha256:bc1667f8b83f48511b94671e0e441401371dfd0f0a795c7daa4a3cd1dde55bea", - "sha256:bec0a414d016ac1a18862a519e54b2fd0fc8bbfd6890376898a6c0891dd82e9f", - "sha256:bf50cd79a75d181c9181df03572cdce0fbb75cc353bc350712073108cba98de5", - "sha256:bff1b4290a66b490a2f4719358c0cdcd9bafb6b8f061e45c7a2460866bf50c2e", - "sha256:c061bb86a71b42465156a3ee7bd58c8c2ceacdbeb95d05a99893e08b8467359a", - "sha256:c8b29db45f8fe46ad280a7294f5c3ec36dbac9491f2d1c17345be8e69cc5928f", - "sha256:ce409136744f6521e39fd8e2a24c53fa18ad67aa5bc7c2cf83645cce5b5c4e50", - "sha256:d050b3361367a06d752db6ead6e7edeb0009be66bc3bae0ee9d97fb326badc2a", - "sha256:d283d37a890ba4c1ae73ffadf8046435c76e7bc2247bbb63c00bd1a709c6544b", - "sha256:d9fad5155d72433c921b782e58892377c44bd6252b5af2f67f16b194987338a4", - "sha256:daa4ee5a243f0f20d528d939d06670a298dd39b1ad5f8a72a4275124a7819eff", - "sha256:db0b55e0f3cc0be60c1f19efdde9a637c32740486004f20d1cff53c3c0ece4d2", - "sha256:e61659ba32cf2cf1481e575d0462554625196a1f2fc06a1c777d3f48e8865d46", - "sha256:ea3d8a3d18833cf4304cd2fc9cbb1efe188ca9b5efef2bdac7adc20594a0e46b", - "sha256:ec6a563cff360b50eed26f13adc43e61bc0c04d94b8be985e6fb24b81f6dcfdf", - "sha256:f5dfb42c4604dddc8e4305050aa6deb084540643ed5804d7455b5df8fe16f5e5", - "sha256:fa173ec60341d6bb97a89f5ea19c85c5643c1e7dedebc22f5181eb73573142c5", - "sha256:fa9db3f79de01457b03d4f01b34cf91bc0048eb2c3846ff26f66687c2f6d16ab", - "sha256:fce659a462a1be54d2ffcacea5e3ba2d74daa74f30f5f143fe0c58636e355fdd", - "sha256:ffee1f21e5ef0d712f9033568f8344d5da8cc2869dbd08d87c84656e6a2d2f68" - ], - "markers": "python_version >= '3.7'", - "version": "==2.1.5" - }, - "matplotlib-inline": { - "hashes": [ - "sha256:8423b23ec666be3d16e16b60bdd8ac4e86e840ebd1dd11a30b9f117f2fa0ab90", - "sha256:df192d39a4ff8f21b1895d72e6a13f5fcc5099f00fa84384e0ea28c2cc0653ca" - ], - "markers": "python_version >= '3.8'", - "version": "==0.1.7" - }, - "mccabe": { - "hashes": [ - "sha256:348e0240c33b60bbdf4e523192ef919f28cb2c3d7d5c7794f74009290f236325", - "sha256:6c2d30ab6be0e4a46919781807b4f0d834ebdd6c6e3dca0bda5a15f863427b6e" - ], - "markers": "python_version >= '3.6'", - "version": "==0.7.0" - }, - "mdurl": { - "hashes": [ - "sha256:84008a41e51615a49fc9966191ff91509e3c40b939176e643fd50a5c2196b8f8", - "sha256:bb413d29f5eea38f31dd4754dd7377d4465116fb207585f97bf925588687c1ba" - ], - "markers": "python_version >= '3.7'", - "version": "==0.1.2" - }, - "more-itertools": { - "hashes": [ - "sha256:686b06abe565edfab151cb8fd385a05651e1fdf8f0a14191e4439283421f8684", - "sha256:8fccb480c43d3e99a00087634c06dd02b0d50fbf088b380de5a41a015ec239e1" - ], - "markers": "python_version >= '3.8'", - "version": "==10.2.0" - }, - "nh3": { - "hashes": [ - "sha256:0316c25b76289cf23be6b66c77d3608a4fdf537b35426280032f432f14291b9a", - "sha256:1a814dd7bba1cb0aba5bcb9bebcc88fd801b63e21e2450ae6c52d3b3336bc911", - "sha256:1aa52a7def528297f256de0844e8dd680ee279e79583c76d6fa73a978186ddfb", - "sha256:22c26e20acbb253a5bdd33d432a326d18508a910e4dcf9a3316179860d53345a", - "sha256:40015514022af31975c0b3bca4014634fa13cb5dc4dbcbc00570acc781316dcc", - "sha256:40d0741a19c3d645e54efba71cb0d8c475b59135c1e3c580f879ad5514cbf028", - "sha256:551672fd71d06cd828e282abdb810d1be24e1abb7ae2543a8fa36a71c1006fe9", - "sha256:66f17d78826096291bd264f260213d2b3905e3c7fae6dfc5337d49429f1dc9f3", - "sha256:85cdbcca8ef10733bd31f931956f7fbb85145a4d11ab9e6742bbf44d88b7e351", - "sha256:a3f55fabe29164ba6026b5ad5c3151c314d136fd67415a17660b4aaddacf1b10", - "sha256:b4427ef0d2dfdec10b641ed0bdaf17957eb625b2ec0ea9329b3d28806c153d71", - "sha256:ba73a2f8d3a1b966e9cdba7b211779ad8a2561d2dba9674b8a19ed817923f65f", - "sha256:c21bac1a7245cbd88c0b0e4a420221b7bfa838a2814ee5bb924e9c2f10a1120b", - "sha256:c551eb2a3876e8ff2ac63dff1585236ed5dfec5ffd82216a7a174f7c5082a78a", - "sha256:c790769152308421283679a142dbdb3d1c46c79c823008ecea8e8141db1a2062", - "sha256:d7a25fd8c86657f5d9d576268e3b3767c5cd4f42867c9383618be8517f0f022a" - ], - "version": "==0.2.17" - }, - "packaging": { - "hashes": [ - "sha256:2ddfb553fdf02fb784c234c7ba6ccc288296ceabec964ad2eae3777778130bc5", - "sha256:eb82c5e3e56209074766e6885bb04b8c38a0c015d0a30036ebe7ece34c9989e9" - ], - "markers": "python_version >= '3.7'", - "version": "==24.0" - }, - "parso": { - "hashes": [ - "sha256:a418670a20291dacd2dddc80c377c5c3791378ee1e8d12bffc35420643d43f18", - "sha256:eb3a7b58240fb99099a345571deecc0f9540ea5f4dd2fe14c2a99d6b281ab92d" - ], - "markers": "python_version >= '3.6'", - "version": "==0.8.4" - }, - "pexpect": { - "hashes": [ - "sha256:7236d1e080e4936be2dc3e326cec0af72acf9212a7e1d060210e70a47e253523", - "sha256:ee7d41123f3c9911050ea2c2dac107568dc43b2d3b0c7557a33212c398ead30f" - ], - "markers": "sys_platform != 'win32' and sys_platform != 'emscripten'", - "version": "==4.9.0" - }, - "pkginfo": { - "hashes": [ - "sha256:5df73835398d10db79f8eecd5cd86b1f6d29317589ea70796994d49399af6297", - "sha256:889a6da2ed7ffc58ab5b900d888ddce90bce912f2d2de1dc1c26f4cb9fe65097" - ], - "markers": "python_version >= '3.6'", - "version": "==1.10.0" - }, - "pluggy": { - "hashes": [ - "sha256:7db9f7b503d67d1c5b95f59773ebb58a8c1c288129a88665838012cfb07b8981", - "sha256:8c85c2876142a764e5b7548e7d9a0e0ddb46f5185161049a79b7e974454223be" - ], - "markers": "python_version >= '3.8'", - "version": "==1.4.0" - }, - "prompt-toolkit": { - "hashes": [ - "sha256:3527b7af26106cbc65a040bcc84839a3566ec1b051bb0bfe953631e704b0ff7d", - "sha256:a11a29cb3bf0a28a387fe5122cdb649816a957cd9261dcedf8c9f1fef33eacf6" - ], - "markers": "python_full_version >= '3.7.0'", - "version": "==3.0.43" - }, - "ptyprocess": { - "hashes": [ - "sha256:4b41f3967fce3af57cc7e94b888626c18bf37a083e3651ca8feeb66d492fef35", - "sha256:5c5d0a3b48ceee0b48485e0c26037c0acd7d29765ca3fbb5cb3831d347423220" - ], - "version": "==0.7.0" - }, - "pure-eval": { - "hashes": [ - "sha256:01eaab343580944bc56080ebe0a674b39ec44a945e6d09ba7db3cb8cec289350", - "sha256:2b45320af6dfaa1750f543d714b6d1c520a1688dec6fd24d339063ce0aaa9ac3" - ], - "version": "==0.2.2" - }, - "pycodestyle": { - "hashes": [ - "sha256:41ba0e7afc9752dfb53ced5489e89f8186be00e599e712660695b7a75ff2663f", - "sha256:44fe31000b2d866f2e41841b18528a505fbd7fef9017b04eff4e2648a0fadc67" - ], - "markers": "python_version >= '3.8'", - "version": "==2.11.1" - }, - "pyflakes": { - "hashes": [ - "sha256:1c61603ff154621fb2a9172037d84dca3500def8c8b630657d1701f026f8af3f", - "sha256:84b5be138a2dfbb40689ca07e2152deb896a65c3a3e24c251c5c62489568074a" - ], - "markers": "python_version >= '3.8'", - "version": "==3.2.0" - }, - "pygments": { - "hashes": [ - "sha256:b27c2826c47d0f3219f29554824c30c5e8945175d888647acd804ddd04af846c", - "sha256:da46cec9fd2de5be3a8a784f434e4c4ab670b4ff54d605c4c2717e9d49c4c367" - ], - "markers": "python_version >= '3.7'", - "version": "==2.17.2" - }, - "pytest": { - "hashes": [ - "sha256:2a8386cfc11fa9d2c50ee7b2a57e7d898ef90470a7a34c4b949ff59662bb78b7", - "sha256:ac978141a75948948817d360297b7aae0fcb9d6ff6bc9ec6d514b85d5a65c044" - ], - "index": "pypi", - "markers": "python_version >= '3.8'", - "version": "==8.1.1" - }, - "pyyaml": { - "hashes": [ - "sha256:04ac92ad1925b2cff1db0cfebffb6ffc43457495c9b3c39d3fcae417d7125dc5", - "sha256:062582fca9fabdd2c8b54a3ef1c978d786e0f6b3a1510e0ac93ef59e0ddae2bc", - "sha256:0d3304d8c0adc42be59c5f8a4d9e3d7379e6955ad754aa9d6ab7a398b59dd1df", - "sha256:1635fd110e8d85d55237ab316b5b011de701ea0f29d07611174a1b42f1444741", - "sha256:184c5108a2aca3c5b3d3bf9395d50893a7ab82a38004c8f61c258d4428e80206", - "sha256:18aeb1bf9a78867dc38b259769503436b7c72f7a1f1f4c93ff9a17de54319b27", - "sha256:1d4c7e777c441b20e32f52bd377e0c409713e8bb1386e1099c2415f26e479595", - "sha256:1e2722cc9fbb45d9b87631ac70924c11d3a401b2d7f410cc0e3bbf249f2dca62", - "sha256:1fe35611261b29bd1de0070f0b2f47cb6ff71fa6595c077e42bd0c419fa27b98", - "sha256:28c119d996beec18c05208a8bd78cbe4007878c6dd15091efb73a30e90539696", - "sha256:326c013efe8048858a6d312ddd31d56e468118ad4cdeda36c719bf5bb6192290", - "sha256:40df9b996c2b73138957fe23a16a4f0ba614f4c0efce1e9406a184b6d07fa3a9", - "sha256:42f8152b8dbc4fe7d96729ec2b99c7097d656dc1213a3229ca5383f973a5ed6d", - "sha256:49a183be227561de579b4a36efbb21b3eab9651dd81b1858589f796549873dd6", - "sha256:4fb147e7a67ef577a588a0e2c17b6db51dda102c71de36f8549b6816a96e1867", - "sha256:50550eb667afee136e9a77d6dc71ae76a44df8b3e51e41b77f6de2932bfe0f47", - "sha256:510c9deebc5c0225e8c96813043e62b680ba2f9c50a08d3724c7f28a747d1486", - "sha256:5773183b6446b2c99bb77e77595dd486303b4faab2b086e7b17bc6bef28865f6", - "sha256:596106435fa6ad000c2991a98fa58eeb8656ef2325d7e158344fb33864ed87e3", - "sha256:6965a7bc3cf88e5a1c3bd2e0b5c22f8d677dc88a455344035f03399034eb3007", - "sha256:69b023b2b4daa7548bcfbd4aa3da05b3a74b772db9e23b982788168117739938", - "sha256:6c22bec3fbe2524cde73d7ada88f6566758a8f7227bfbf93a408a9d86bcc12a0", - "sha256:704219a11b772aea0d8ecd7058d0082713c3562b4e271b849ad7dc4a5c90c13c", - "sha256:7e07cbde391ba96ab58e532ff4803f79c4129397514e1413a7dc761ccd755735", - "sha256:81e0b275a9ecc9c0c0c07b4b90ba548307583c125f54d5b6946cfee6360c733d", - "sha256:855fb52b0dc35af121542a76b9a84f8d1cd886ea97c84703eaa6d88e37a2ad28", - "sha256:8d4e9c88387b0f5c7d5f281e55304de64cf7f9c0021a3525bd3b1c542da3b0e4", - "sha256:9046c58c4395dff28dd494285c82ba00b546adfc7ef001486fbf0324bc174fba", - "sha256:9eb6caa9a297fc2c2fb8862bc5370d0303ddba53ba97e71f08023b6cd73d16a8", - "sha256:a08c6f0fe150303c1c6b71ebcd7213c2858041a7e01975da3a99aed1e7a378ef", - "sha256:a0cd17c15d3bb3fa06978b4e8958dcdc6e0174ccea823003a106c7d4d7899ac5", - "sha256:afd7e57eddb1a54f0f1a974bc4391af8bcce0b444685d936840f125cf046d5bd", - "sha256:b1275ad35a5d18c62a7220633c913e1b42d44b46ee12554e5fd39c70a243d6a3", - "sha256:b786eecbdf8499b9ca1d697215862083bd6d2a99965554781d0d8d1ad31e13a0", - "sha256:ba336e390cd8e4d1739f42dfe9bb83a3cc2e80f567d8805e11b46f4a943f5515", - "sha256:baa90d3f661d43131ca170712d903e6295d1f7a0f595074f151c0aed377c9b9c", - "sha256:bc1bf2925a1ecd43da378f4db9e4f799775d6367bdb94671027b73b393a7c42c", - "sha256:bd4af7373a854424dabd882decdc5579653d7868b8fb26dc7d0e99f823aa5924", - "sha256:bf07ee2fef7014951eeb99f56f39c9bb4af143d8aa3c21b1677805985307da34", - "sha256:bfdf460b1736c775f2ba9f6a92bca30bc2095067b8a9d77876d1fad6cc3b4a43", - "sha256:c8098ddcc2a85b61647b2590f825f3db38891662cfc2fc776415143f599bb859", - "sha256:d2b04aac4d386b172d5b9692e2d2da8de7bfb6c387fa4f801fbf6fb2e6ba4673", - "sha256:d483d2cdf104e7c9fa60c544d92981f12ad66a457afae824d146093b8c294c54", - "sha256:d858aa552c999bc8a8d57426ed01e40bef403cd8ccdd0fc5f6f04a00414cac2a", - "sha256:e7d73685e87afe9f3b36c799222440d6cf362062f78be1013661b00c5c6f678b", - "sha256:f003ed9ad21d6a4713f0a9b5a7a0a79e08dd0f221aff4525a2be4c346ee60aab", - "sha256:f22ac1c3cac4dbc50079e965eba2c1058622631e526bd9afd45fedd49ba781fa", - "sha256:faca3bdcf85b2fc05d06ff3fbc1f83e1391b3e724afa3feba7d13eeab355484c", - "sha256:fca0e3a251908a499833aa292323f32437106001d436eca0e6e7833256674585", - "sha256:fd1592b3fdf65fff2ad0004b5e363300ef59ced41c2e6b3a99d4089fa8c5435d", - "sha256:fd66fc5d0da6d9815ba2cebeb4205f95818ff4b79c3ebe268e75d961704af52f" - ], - "index": "pypi", - "markers": "python_version >= '3.6'", - "version": "==6.0.1" - }, - "readme-renderer": { - "hashes": [ - "sha256:1818dd28140813509eeed8d62687f7cd4f7bad90d4db586001c5dc09d4fde311", - "sha256:19db308d86ecd60e5affa3b2a98f017af384678c63c88e5d4556a380e674f3f9" - ], - "markers": "python_version >= '3.8'", - "version": "==43.0" - }, - "requests": { - "hashes": [ - "sha256:58cd2187c01e70e6e26505bca751777aa9f2ee0b7f4300988b709f44e013003f", - "sha256:942c5a758f98d790eaed1a29cb6eefc7ffb0d1cf7af05c3d2791656dbd6ad1e1" - ], - "markers": "python_version >= '3.7'", - "version": "==2.31.0" - }, - "requests-toolbelt": { - "hashes": [ - "sha256:7681a0a3d047012b5bdc0ee37d7f8f07ebe76ab08caeccfc3921ce23c88d5bc6", - "sha256:cccfdd665f0a24fcf4726e690f65639d272bb0637b9b92dfd91a5568ccf6bd06" - ], - "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'", - "version": "==1.0.0" - }, - "rfc3986": { - "hashes": [ - "sha256:50b1502b60e289cb37883f3dfd34532b8873c7de9f49bb546641ce9cbd256ebd", - "sha256:97aacf9dbd4bfd829baad6e6309fa6573aaf1be3f6fa735c8ab05e46cecb261c" - ], - "markers": "python_version >= '3.7'", - "version": "==2.0.0" - }, - "rich": { - "hashes": [ - "sha256:4edbae314f59eb482f54e9e30bf00d33350aaa94f4bfcd4e9e3110e64d0d7222", - "sha256:9be308cb1fe2f1f57d67ce99e95af38a1e2bc71ad9813b0e247cf7ffbcc3a432" - ], - "markers": "python_full_version >= '3.7.0'", - "version": "==13.7.1" - }, - "six": { - "hashes": [ - "sha256:1e61c37477a1626458e36f7b1d82aa5c9b094fa4802892072e49de9c60c4c926", - "sha256:8abb2f1d86890a2dfb989f9a77cfcfd3e47c2a354b01111771326f8aa26e0254" - ], - "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'", - "version": "==1.16.0" - }, - "snowballstemmer": { - "hashes": [ - "sha256:09b16deb8547d3412ad7b590689584cd0fe25ec8db3be37788be3810cbf19cb1", - "sha256:c8e1716e83cc398ae16824e5572ae04e0d9fc2c6b985fb0f900f5f0c96ecba1a" - ], - "version": "==2.2.0" - }, - "sphinx": { - "hashes": [ - "sha256:30d03bbaa53b77d38863fd6b95cc4edb4a84a1512787b3b0c12fb3b4fb25d9e9", - "sha256:e6a8f418321429669ef9c1e20c1f294b3fe1f248206b46044c86e1545480687f" - ], - "index": "pypi", - "markers": "python_version >= '3.9'", - "version": "==7.3.5" - }, - "sphinx-rtd-theme": { - "hashes": [ - "sha256:bd5d7b80622406762073a04ef8fadc5f9151261563d47027de09910ce03afe6b", - "sha256:ec93d0856dc280cf3aee9a4c9807c60e027c7f7b461b77aeffed682e68f0e586" - ], - "index": "pypi", - "markers": "python_version >= '3.6'", - "version": "==2.0.0" - }, - "sphinxcontrib-applehelp": { - "hashes": [ - "sha256:c40a4f96f3776c4393d933412053962fac2b84f4c99a7982ba42e09576a70619", - "sha256:cb61eb0ec1b61f349e5cc36b2028e9e7ca765be05e49641c97241274753067b4" - ], - "markers": "python_version >= '3.9'", - "version": "==1.0.8" - }, - "sphinxcontrib-devhelp": { - "hashes": [ - "sha256:6485d09629944511c893fa11355bda18b742b83a2b181f9a009f7e500595c90f", - "sha256:9893fd3f90506bc4b97bdb977ceb8fbd823989f4316b28c3841ec128544372d3" - ], - "markers": "python_version >= '3.9'", - "version": "==1.0.6" - }, - "sphinxcontrib-htmlhelp": { - "hashes": [ - "sha256:0dc87637d5de53dd5eec3a6a01753b1ccf99494bd756aafecd74b4fa9e729015", - "sha256:393f04f112b4d2f53d93448d4bce35842f62b307ccdc549ec1585e950bc35e04" - ], - "markers": "python_version >= '3.9'", - "version": "==2.0.5" - }, - "sphinxcontrib-jquery": { - "hashes": [ - "sha256:1620739f04e36a2c779f1a131a2dfd49b2fd07351bf1968ced074365933abc7a", - "sha256:f936030d7d0147dd026a4f2b5a57343d233f1fc7b363f68b3d4f1cb0993878ae" - ], - "markers": "python_version >= '2.7'", - "version": "==4.1" - }, - "sphinxcontrib-jsmath": { - "hashes": [ - "sha256:2ec2eaebfb78f3f2078e73666b1415417a116cc848b72e5172e596c871103178", - "sha256:a9925e4a4587247ed2191a22df5f6970656cb8ca2bd6284309578f2153e0c4b8" - ], - "markers": "python_version >= '3.5'", - "version": "==1.0.1" - }, - "sphinxcontrib-qthelp": { - "hashes": [ - "sha256:053dedc38823a80a7209a80860b16b722e9e0209e32fea98c90e4e6624588ed6", - "sha256:e2ae3b5c492d58fcbd73281fbd27e34b8393ec34a073c792642cd8e529288182" - ], - "markers": "python_version >= '3.9'", - "version": "==1.0.7" - }, - "sphinxcontrib-serializinghtml": { - "hashes": [ - "sha256:326369b8df80a7d2d8d7f99aa5ac577f51ea51556ed974e7716cfd4fca3f6cb7", - "sha256:93f3f5dc458b91b192fe10c397e324f262cf163d79f3282c158e8436a2c4511f" - ], - "markers": "python_version >= '3.9'", - "version": "==1.1.10" - }, - "stack-data": { - "hashes": [ - "sha256:836a778de4fec4dcd1dcd89ed8abff8a221f58308462e1c4aa2a3cf30148f0b9", - "sha256:d5558e0c25a4cb0853cddad3d77da9891a08cb85dd9f9f91b9f8cd66e511e695" - ], - "version": "==0.6.3" - }, - "tomli": { - "hashes": [ - "sha256:939de3e7a6161af0c887ef91b7d41a53e7c5a1ca976325f429cb46ea9bc30ecc", - "sha256:de526c12914f0c550d15924c62d72abc48d6fe7364aa87328337a31007fe8a4f" - ], - "markers": "python_version < '3.11'", - "version": "==2.0.1" - }, - "traitlets": { - "hashes": [ - "sha256:8cdd83c040dab7d1dee822678e5f5d100b514f7b72b01615b26fc5718916fdf9", - "sha256:fcdf85684a772ddeba87db2f398ce00b40ff550d1528c03c14dbf6a02003cd80" - ], - "markers": "python_version >= '3.8'", - "version": "==5.14.2" - }, - "twine": { - "hashes": [ - "sha256:89b0cc7d370a4b66421cc6102f269aa910fe0f1861c124f573cf2ddedbc10cf4", - "sha256:a262933de0b484c53408f9edae2e7821c1c45a3314ff2df9bdd343aa7ab8edc0" - ], - "index": "pypi", - "markers": "python_version >= '3.8'", - "version": "==5.0.0" - }, - "typing-extensions": { - "hashes": [ - "sha256:83f085bd5ca59c80295fc2a82ab5dac679cbe02b9f33f7d83af68e241bea51b0", - "sha256:c1f94d72897edaf4ce775bb7558d5b79d8126906a14ea5ed1635921406c0387a" - ], - "markers": "python_version < '3.12'", - "version": "==4.11.0" - }, - "urllib3": { - "hashes": [ - "sha256:450b20ec296a467077128bff42b73080516e71b56ff59a60a02bef2232c4fa9d", - "sha256:d0570876c61ab9e520d776c38acbbb5b05a776d3f9ff98a5c8fd5162a444cf19" - ], - "markers": "python_version >= '3.8'", - "version": "==2.2.1" - }, - "versioneer": { - "hashes": [ - "sha256:0f1a137bb5d6811e96a79bb0486798aeae9b9c6efc24b389659cebb0ee396cb9", - "sha256:5ab283b9857211d61b53318b7c792cf68e798e765ee17c27ade9f6c924235731" - ], - "index": "pypi", - "markers": "python_version >= '3.7'", - "version": "==0.29" - }, - "wcwidth": { - "hashes": [ - "sha256:3da69048e4540d84af32131829ff948f1e022c1c6bdb8d6102117aac784f6859", - "sha256:72ea0c06399eb286d978fdedb6923a9eb47e1c486ce63e9b4e64fc18303972b5" - ], - "version": "==0.2.13" - }, - "zipp": { - "hashes": [ - "sha256:206f5a15f2af3dbaee80769fb7dc6f249695e940acca08dfb2a4769fe61e538b", - "sha256:2884ed22e7d8961de1c9a05142eb69a247f120291bc0206a00a7642f09b5b715" - ], - "markers": "python_version >= '3.8'", - "version": "==3.18.1" - } - } -} diff --git a/poetry.lock b/poetry.lock new file mode 100644 index 0000000..0ad8b6c --- /dev/null +++ b/poetry.lock @@ -0,0 +1,960 @@ +# This file is automatically @generated by Poetry 1.8.3 and should not be changed by hand. + +[[package]] +name = "alabaster" +version = "0.7.16" +description = "A light, configurable Sphinx theme" +optional = false +python-versions = ">=3.9" +files = [ + {file = "alabaster-0.7.16-py3-none-any.whl", hash = "sha256:b46733c07dce03ae4e150330b975c75737fa60f0a7c591b6c8bf4928a28e2c92"}, + {file = "alabaster-0.7.16.tar.gz", hash = "sha256:75a8b99c28a5dad50dd7f8ccdd447a121ddb3892da9e53d1ca5cca3106d58d65"}, +] + +[[package]] +name = "asttokens" +version = "2.4.1" +description = "Annotate AST trees with source code positions" +optional = false +python-versions = "*" +files = [ + {file = "asttokens-2.4.1-py2.py3-none-any.whl", hash = "sha256:051ed49c3dcae8913ea7cd08e46a606dba30b79993209636c4875bc1d637bc24"}, + {file = "asttokens-2.4.1.tar.gz", hash = "sha256:b03869718ba9a6eb027e134bfdf69f38a236d681c83c160d510768af11254ba0"}, +] + +[package.dependencies] +six = ">=1.12.0" + +[package.extras] +astroid = ["astroid (>=1,<2)", "astroid (>=2,<4)"] +test = ["astroid (>=1,<2)", "astroid (>=2,<4)", "pytest"] + +[[package]] +name = "babel" +version = "2.15.0" +description = "Internationalization utilities" +optional = false +python-versions = ">=3.8" +files = [ + {file = "Babel-2.15.0-py3-none-any.whl", hash = "sha256:08706bdad8d0a3413266ab61bd6c34d0c28d6e1e7badf40a2cebe67644e2e1fb"}, + {file = "babel-2.15.0.tar.gz", hash = "sha256:8daf0e265d05768bc6c7a314cf1321e9a123afc328cc635c18622a2f30a04413"}, +] + +[package.extras] +dev = ["freezegun (>=1.0,<2.0)", "pytest (>=6.0)", "pytest-cov"] + +[[package]] +name = "certifi" +version = "2024.6.2" +description = "Python package for providing Mozilla's CA Bundle." +optional = false +python-versions = ">=3.6" +files = [ + {file = "certifi-2024.6.2-py3-none-any.whl", hash = "sha256:ddc6c8ce995e6987e7faf5e3f1b02b302836a0e5d98ece18392cb1a36c72ad56"}, + {file = "certifi-2024.6.2.tar.gz", hash = "sha256:3cd43f1c6fa7dedc5899d69d3ad0398fd018ad1a17fba83ddaf78aa46c747516"}, +] + +[[package]] +name = "charset-normalizer" +version = "3.3.2" +description = "The Real First Universal Charset Detector. Open, modern and actively maintained alternative to Chardet." +optional = false +python-versions = ">=3.7.0" +files = [ + {file = "charset-normalizer-3.3.2.tar.gz", hash = "sha256:f30c3cb33b24454a82faecaf01b19c18562b1e89558fb6c56de4d9118a032fd5"}, + {file = "charset_normalizer-3.3.2-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:25baf083bf6f6b341f4121c2f3c548875ee6f5339300e08be3f2b2ba1721cdd3"}, + {file = "charset_normalizer-3.3.2-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:06435b539f889b1f6f4ac1758871aae42dc3a8c0e24ac9e60c2384973ad73027"}, + {file = "charset_normalizer-3.3.2-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:9063e24fdb1e498ab71cb7419e24622516c4a04476b17a2dab57e8baa30d6e03"}, + {file = "charset_normalizer-3.3.2-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:6897af51655e3691ff853668779c7bad41579facacf5fd7253b0133308cf000d"}, + {file = "charset_normalizer-3.3.2-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:1d3193f4a680c64b4b6a9115943538edb896edc190f0b222e73761716519268e"}, + {file = "charset_normalizer-3.3.2-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:cd70574b12bb8a4d2aaa0094515df2463cb429d8536cfb6c7ce983246983e5a6"}, + {file = "charset_normalizer-3.3.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8465322196c8b4d7ab6d1e049e4c5cb460d0394da4a27d23cc242fbf0034b6b5"}, + {file = "charset_normalizer-3.3.2-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:a9a8e9031d613fd2009c182b69c7b2c1ef8239a0efb1df3f7c8da66d5dd3d537"}, + {file = "charset_normalizer-3.3.2-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:beb58fe5cdb101e3a055192ac291b7a21e3b7ef4f67fa1d74e331a7f2124341c"}, + {file = "charset_normalizer-3.3.2-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:e06ed3eb3218bc64786f7db41917d4e686cc4856944f53d5bdf83a6884432e12"}, + {file = "charset_normalizer-3.3.2-cp310-cp310-musllinux_1_1_ppc64le.whl", hash = "sha256:2e81c7b9c8979ce92ed306c249d46894776a909505d8f5a4ba55b14206e3222f"}, + {file = "charset_normalizer-3.3.2-cp310-cp310-musllinux_1_1_s390x.whl", hash = "sha256:572c3763a264ba47b3cf708a44ce965d98555f618ca42c926a9c1616d8f34269"}, + {file = "charset_normalizer-3.3.2-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:fd1abc0d89e30cc4e02e4064dc67fcc51bd941eb395c502aac3ec19fab46b519"}, + {file = "charset_normalizer-3.3.2-cp310-cp310-win32.whl", hash = "sha256:3d47fa203a7bd9c5b6cee4736ee84ca03b8ef23193c0d1ca99b5089f72645c73"}, + {file = "charset_normalizer-3.3.2-cp310-cp310-win_amd64.whl", hash = "sha256:10955842570876604d404661fbccbc9c7e684caf432c09c715ec38fbae45ae09"}, + {file = "charset_normalizer-3.3.2-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:802fe99cca7457642125a8a88a084cef28ff0cf9407060f7b93dca5aa25480db"}, + {file = "charset_normalizer-3.3.2-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:573f6eac48f4769d667c4442081b1794f52919e7edada77495aaed9236d13a96"}, + {file = "charset_normalizer-3.3.2-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:549a3a73da901d5bc3ce8d24e0600d1fa85524c10287f6004fbab87672bf3e1e"}, + {file = "charset_normalizer-3.3.2-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f27273b60488abe721a075bcca6d7f3964f9f6f067c8c4c605743023d7d3944f"}, + {file = "charset_normalizer-3.3.2-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:1ceae2f17a9c33cb48e3263960dc5fc8005351ee19db217e9b1bb15d28c02574"}, + {file = "charset_normalizer-3.3.2-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:65f6f63034100ead094b8744b3b97965785388f308a64cf8d7c34f2f2e5be0c4"}, + {file = "charset_normalizer-3.3.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:753f10e867343b4511128c6ed8c82f7bec3bd026875576dfd88483c5c73b2fd8"}, + {file = "charset_normalizer-3.3.2-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:4a78b2b446bd7c934f5dcedc588903fb2f5eec172f3d29e52a9096a43722adfc"}, + {file = "charset_normalizer-3.3.2-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:e537484df0d8f426ce2afb2d0f8e1c3d0b114b83f8850e5f2fbea0e797bd82ae"}, + {file = "charset_normalizer-3.3.2-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:eb6904c354526e758fda7167b33005998fb68c46fbc10e013ca97f21ca5c8887"}, + {file = "charset_normalizer-3.3.2-cp311-cp311-musllinux_1_1_ppc64le.whl", hash = "sha256:deb6be0ac38ece9ba87dea880e438f25ca3eddfac8b002a2ec3d9183a454e8ae"}, + {file = "charset_normalizer-3.3.2-cp311-cp311-musllinux_1_1_s390x.whl", hash = "sha256:4ab2fe47fae9e0f9dee8c04187ce5d09f48eabe611be8259444906793ab7cbce"}, + {file = "charset_normalizer-3.3.2-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:80402cd6ee291dcb72644d6eac93785fe2c8b9cb30893c1af5b8fdd753b9d40f"}, + {file = "charset_normalizer-3.3.2-cp311-cp311-win32.whl", hash = "sha256:7cd13a2e3ddeed6913a65e66e94b51d80a041145a026c27e6bb76c31a853c6ab"}, + {file = "charset_normalizer-3.3.2-cp311-cp311-win_amd64.whl", hash = "sha256:663946639d296df6a2bb2aa51b60a2454ca1cb29835324c640dafb5ff2131a77"}, + {file = "charset_normalizer-3.3.2-cp312-cp312-macosx_10_9_universal2.whl", hash = "sha256:0b2b64d2bb6d3fb9112bafa732def486049e63de9618b5843bcdd081d8144cd8"}, + {file = "charset_normalizer-3.3.2-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:ddbb2551d7e0102e7252db79ba445cdab71b26640817ab1e3e3648dad515003b"}, + {file = "charset_normalizer-3.3.2-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:55086ee1064215781fff39a1af09518bc9255b50d6333f2e4c74ca09fac6a8f6"}, + {file = "charset_normalizer-3.3.2-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:8f4a014bc36d3c57402e2977dada34f9c12300af536839dc38c0beab8878f38a"}, + {file = "charset_normalizer-3.3.2-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:a10af20b82360ab00827f916a6058451b723b4e65030c5a18577c8b2de5b3389"}, + {file = "charset_normalizer-3.3.2-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:8d756e44e94489e49571086ef83b2bb8ce311e730092d2c34ca8f7d925cb20aa"}, + {file = "charset_normalizer-3.3.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:90d558489962fd4918143277a773316e56c72da56ec7aa3dc3dbbe20fdfed15b"}, + {file = "charset_normalizer-3.3.2-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:6ac7ffc7ad6d040517be39eb591cac5ff87416c2537df6ba3cba3bae290c0fed"}, + {file = "charset_normalizer-3.3.2-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:7ed9e526742851e8d5cc9e6cf41427dfc6068d4f5a3bb03659444b4cabf6bc26"}, + {file = "charset_normalizer-3.3.2-cp312-cp312-musllinux_1_1_i686.whl", hash = "sha256:8bdb58ff7ba23002a4c5808d608e4e6c687175724f54a5dade5fa8c67b604e4d"}, + {file = "charset_normalizer-3.3.2-cp312-cp312-musllinux_1_1_ppc64le.whl", hash = "sha256:6b3251890fff30ee142c44144871185dbe13b11bab478a88887a639655be1068"}, + {file = "charset_normalizer-3.3.2-cp312-cp312-musllinux_1_1_s390x.whl", hash = "sha256:b4a23f61ce87adf89be746c8a8974fe1c823c891d8f86eb218bb957c924bb143"}, + {file = "charset_normalizer-3.3.2-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:efcb3f6676480691518c177e3b465bcddf57cea040302f9f4e6e191af91174d4"}, + {file = "charset_normalizer-3.3.2-cp312-cp312-win32.whl", hash = "sha256:d965bba47ddeec8cd560687584e88cf699fd28f192ceb452d1d7ee807c5597b7"}, + {file = "charset_normalizer-3.3.2-cp312-cp312-win_amd64.whl", hash = "sha256:96b02a3dc4381e5494fad39be677abcb5e6634bf7b4fa83a6dd3112607547001"}, + {file = "charset_normalizer-3.3.2-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:95f2a5796329323b8f0512e09dbb7a1860c46a39da62ecb2324f116fa8fdc85c"}, + {file = "charset_normalizer-3.3.2-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c002b4ffc0be611f0d9da932eb0f704fe2602a9a949d1f738e4c34c75b0863d5"}, + {file = "charset_normalizer-3.3.2-cp37-cp37m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:a981a536974bbc7a512cf44ed14938cf01030a99e9b3a06dd59578882f06f985"}, + {file = "charset_normalizer-3.3.2-cp37-cp37m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:3287761bc4ee9e33561a7e058c72ac0938c4f57fe49a09eae428fd88aafe7bb6"}, + {file = "charset_normalizer-3.3.2-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:42cb296636fcc8b0644486d15c12376cb9fa75443e00fb25de0b8602e64c1714"}, + {file = "charset_normalizer-3.3.2-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:0a55554a2fa0d408816b3b5cedf0045f4b8e1a6065aec45849de2d6f3f8e9786"}, + {file = "charset_normalizer-3.3.2-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:c083af607d2515612056a31f0a8d9e0fcb5876b7bfc0abad3ecd275bc4ebc2d5"}, + {file = "charset_normalizer-3.3.2-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:87d1351268731db79e0f8e745d92493ee2841c974128ef629dc518b937d9194c"}, + {file = "charset_normalizer-3.3.2-cp37-cp37m-musllinux_1_1_ppc64le.whl", hash = "sha256:bd8f7df7d12c2db9fab40bdd87a7c09b1530128315d047a086fa3ae3435cb3a8"}, + {file = "charset_normalizer-3.3.2-cp37-cp37m-musllinux_1_1_s390x.whl", hash = "sha256:c180f51afb394e165eafe4ac2936a14bee3eb10debc9d9e4db8958fe36afe711"}, + {file = "charset_normalizer-3.3.2-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:8c622a5fe39a48f78944a87d4fb8a53ee07344641b0562c540d840748571b811"}, + {file = "charset_normalizer-3.3.2-cp37-cp37m-win32.whl", hash = "sha256:db364eca23f876da6f9e16c9da0df51aa4f104a972735574842618b8c6d999d4"}, + {file = "charset_normalizer-3.3.2-cp37-cp37m-win_amd64.whl", hash = "sha256:86216b5cee4b06df986d214f664305142d9c76df9b6512be2738aa72a2048f99"}, + {file = "charset_normalizer-3.3.2-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:6463effa3186ea09411d50efc7d85360b38d5f09b870c48e4600f63af490e56a"}, + {file = "charset_normalizer-3.3.2-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:6c4caeef8fa63d06bd437cd4bdcf3ffefe6738fb1b25951440d80dc7df8c03ac"}, + {file = "charset_normalizer-3.3.2-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:37e55c8e51c236f95b033f6fb391d7d7970ba5fe7ff453dad675e88cf303377a"}, + {file = "charset_normalizer-3.3.2-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:fb69256e180cb6c8a894fee62b3afebae785babc1ee98b81cdf68bbca1987f33"}, + {file = "charset_normalizer-3.3.2-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:ae5f4161f18c61806f411a13b0310bea87f987c7d2ecdbdaad0e94eb2e404238"}, + {file = "charset_normalizer-3.3.2-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:b2b0a0c0517616b6869869f8c581d4eb2dd83a4d79e0ebcb7d373ef9956aeb0a"}, + {file = "charset_normalizer-3.3.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:45485e01ff4d3630ec0d9617310448a8702f70e9c01906b0d0118bdf9d124cf2"}, + {file = "charset_normalizer-3.3.2-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:eb00ed941194665c332bf8e078baf037d6c35d7c4f3102ea2d4f16ca94a26dc8"}, + {file = "charset_normalizer-3.3.2-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:2127566c664442652f024c837091890cb1942c30937add288223dc895793f898"}, + {file = "charset_normalizer-3.3.2-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:a50aebfa173e157099939b17f18600f72f84eed3049e743b68ad15bd69b6bf99"}, + {file = "charset_normalizer-3.3.2-cp38-cp38-musllinux_1_1_ppc64le.whl", hash = "sha256:4d0d1650369165a14e14e1e47b372cfcb31d6ab44e6e33cb2d4e57265290044d"}, + {file = "charset_normalizer-3.3.2-cp38-cp38-musllinux_1_1_s390x.whl", hash = "sha256:923c0c831b7cfcb071580d3f46c4baf50f174be571576556269530f4bbd79d04"}, + {file = "charset_normalizer-3.3.2-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:06a81e93cd441c56a9b65d8e1d043daeb97a3d0856d177d5c90ba85acb3db087"}, + {file = "charset_normalizer-3.3.2-cp38-cp38-win32.whl", hash = "sha256:6ef1d82a3af9d3eecdba2321dc1b3c238245d890843e040e41e470ffa64c3e25"}, + {file = "charset_normalizer-3.3.2-cp38-cp38-win_amd64.whl", hash = "sha256:eb8821e09e916165e160797a6c17edda0679379a4be5c716c260e836e122f54b"}, + {file = "charset_normalizer-3.3.2-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:c235ebd9baae02f1b77bcea61bce332cb4331dc3617d254df3323aa01ab47bd4"}, + {file = "charset_normalizer-3.3.2-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:5b4c145409bef602a690e7cfad0a15a55c13320ff7a3ad7ca59c13bb8ba4d45d"}, + {file = "charset_normalizer-3.3.2-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:68d1f8a9e9e37c1223b656399be5d6b448dea850bed7d0f87a8311f1ff3dabb0"}, + {file = "charset_normalizer-3.3.2-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:22afcb9f253dac0696b5a4be4a1c0f8762f8239e21b99680099abd9b2b1b2269"}, + {file = "charset_normalizer-3.3.2-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:e27ad930a842b4c5eb8ac0016b0a54f5aebbe679340c26101df33424142c143c"}, + {file = "charset_normalizer-3.3.2-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:1f79682fbe303db92bc2b1136016a38a42e835d932bab5b3b1bfcfbf0640e519"}, + {file = "charset_normalizer-3.3.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b261ccdec7821281dade748d088bb6e9b69e6d15b30652b74cbbac25e280b796"}, + {file = "charset_normalizer-3.3.2-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:122c7fa62b130ed55f8f285bfd56d5f4b4a5b503609d181f9ad85e55c89f4185"}, + {file = "charset_normalizer-3.3.2-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:d0eccceffcb53201b5bfebb52600a5fb483a20b61da9dbc885f8b103cbe7598c"}, + {file = "charset_normalizer-3.3.2-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:9f96df6923e21816da7e0ad3fd47dd8f94b2a5ce594e00677c0013018b813458"}, + {file = "charset_normalizer-3.3.2-cp39-cp39-musllinux_1_1_ppc64le.whl", hash = "sha256:7f04c839ed0b6b98b1a7501a002144b76c18fb1c1850c8b98d458ac269e26ed2"}, + {file = "charset_normalizer-3.3.2-cp39-cp39-musllinux_1_1_s390x.whl", hash = "sha256:34d1c8da1e78d2e001f363791c98a272bb734000fcef47a491c1e3b0505657a8"}, + {file = "charset_normalizer-3.3.2-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:ff8fa367d09b717b2a17a052544193ad76cd49979c805768879cb63d9ca50561"}, + {file = "charset_normalizer-3.3.2-cp39-cp39-win32.whl", hash = "sha256:aed38f6e4fb3f5d6bf81bfa990a07806be9d83cf7bacef998ab1a9bd660a581f"}, + {file = "charset_normalizer-3.3.2-cp39-cp39-win_amd64.whl", hash = "sha256:b01b88d45a6fcb69667cd6d2f7a9aeb4bf53760d7fc536bf679ec94fe9f3ff3d"}, + {file = "charset_normalizer-3.3.2-py3-none-any.whl", hash = "sha256:3e4d1f6587322d2788836a99c69062fbb091331ec940e02d12d179c1d53e25fc"}, +] + +[[package]] +name = "colorama" +version = "0.4.6" +description = "Cross-platform colored terminal text." +optional = false +python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*,!=3.6.*,>=2.7" +files = [ + {file = "colorama-0.4.6-py2.py3-none-any.whl", hash = "sha256:4f1d9991f5acc0ca119f9d443620b77f9d6b33703e51011c16baf57afb285fc6"}, + {file = "colorama-0.4.6.tar.gz", hash = "sha256:08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44"}, +] + +[[package]] +name = "decorator" +version = "5.1.1" +description = "Decorators for Humans" +optional = false +python-versions = ">=3.5" +files = [ + {file = "decorator-5.1.1-py3-none-any.whl", hash = "sha256:b8c3f85900b9dc423225913c5aace94729fe1fa9763b38939a95226f02d37186"}, + {file = "decorator-5.1.1.tar.gz", hash = "sha256:637996211036b6385ef91435e4fae22989472f9d571faba8927ba8253acbc330"}, +] + +[[package]] +name = "docutils" +version = "0.20.1" +description = "Docutils -- Python Documentation Utilities" +optional = false +python-versions = ">=3.7" +files = [ + {file = "docutils-0.20.1-py3-none-any.whl", hash = "sha256:96f387a2c5562db4476f09f13bbab2192e764cac08ebbf3a34a95d9b1e4a59d6"}, + {file = "docutils-0.20.1.tar.gz", hash = "sha256:f08a4e276c3a1583a86dce3e34aba3fe04d02bba2dd51ed16106244e8a923e3b"}, +] + +[[package]] +name = "exceptiongroup" +version = "1.2.1" +description = "Backport of PEP 654 (exception groups)" +optional = false +python-versions = ">=3.7" +files = [ + {file = "exceptiongroup-1.2.1-py3-none-any.whl", hash = "sha256:5258b9ed329c5bbdd31a309f53cbfb0b155341807f6ff7606a1e801a891b29ad"}, + {file = "exceptiongroup-1.2.1.tar.gz", hash = "sha256:a4785e48b045528f5bfe627b6ad554ff32def154f42372786903b7abcfe1aa16"}, +] + +[package.extras] +test = ["pytest (>=6)"] + +[[package]] +name = "executing" +version = "2.0.1" +description = "Get the currently executing AST node of a frame, and other information" +optional = false +python-versions = ">=3.5" +files = [ + {file = "executing-2.0.1-py2.py3-none-any.whl", hash = "sha256:eac49ca94516ccc753f9fb5ce82603156e590b27525a8bc32cce8ae302eb61bc"}, + {file = "executing-2.0.1.tar.gz", hash = "sha256:35afe2ce3affba8ee97f2d69927fa823b08b472b7b994e36a52a964b93d16147"}, +] + +[package.extras] +tests = ["asttokens (>=2.1.0)", "coverage", "coverage-enable-subprocess", "ipython", "littleutils", "pytest", "rich"] + +[[package]] +name = "idna" +version = "3.7" +description = "Internationalized Domain Names in Applications (IDNA)" +optional = false +python-versions = ">=3.5" +files = [ + {file = "idna-3.7-py3-none-any.whl", hash = "sha256:82fee1fc78add43492d3a1898bfa6d8a904cc97d8427f683ed8e798d07761aa0"}, + {file = "idna-3.7.tar.gz", hash = "sha256:028ff3aadf0609c1fd278d8ea3089299412a7a8b9bd005dd08b9f8285bcb5cfc"}, +] + +[[package]] +name = "imagesize" +version = "1.4.1" +description = "Getting image size from png/jpeg/jpeg2000/gif file" +optional = false +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" +files = [ + {file = "imagesize-1.4.1-py2.py3-none-any.whl", hash = "sha256:0d8d18d08f840c19d0ee7ca1fd82490fdc3729b7ac93f49870406ddde8ef8d8b"}, + {file = "imagesize-1.4.1.tar.gz", hash = "sha256:69150444affb9cb0d5cc5a92b3676f0b2fb7cd9ae39e947a5e11a36b4497cd4a"}, +] + +[[package]] +name = "iniconfig" +version = "2.0.0" +description = "brain-dead simple config-ini parsing" +optional = false +python-versions = ">=3.7" +files = [ + {file = "iniconfig-2.0.0-py3-none-any.whl", hash = "sha256:b6a85871a79d2e3b22d2d1b94ac2824226a63c6b741c88f7ae975f18b6778374"}, + {file = "iniconfig-2.0.0.tar.gz", hash = "sha256:2d91e135bf72d31a410b17c16da610a82cb55f6b0477d1a902134b24a455b8b3"}, +] + +[[package]] +name = "ipython" +version = "8.25.0" +description = "IPython: Productive Interactive Computing" +optional = false +python-versions = ">=3.10" +files = [ + {file = "ipython-8.25.0-py3-none-any.whl", hash = "sha256:53eee7ad44df903a06655871cbab66d156a051fd86f3ec6750470ac9604ac1ab"}, + {file = "ipython-8.25.0.tar.gz", hash = "sha256:c6ed726a140b6e725b911528f80439c534fac915246af3efc39440a6b0f9d716"}, +] + +[package.dependencies] +colorama = {version = "*", markers = "sys_platform == \"win32\""} +decorator = "*" +exceptiongroup = {version = "*", markers = "python_version < \"3.11\""} +jedi = ">=0.16" +matplotlib-inline = "*" +pexpect = {version = ">4.3", markers = "sys_platform != \"win32\" and sys_platform != \"emscripten\""} +prompt-toolkit = ">=3.0.41,<3.1.0" +pygments = ">=2.4.0" +stack-data = "*" +traitlets = ">=5.13.0" +typing-extensions = {version = ">=4.6", markers = "python_version < \"3.12\""} + +[package.extras] +all = ["ipython[black,doc,kernel,matplotlib,nbconvert,nbformat,notebook,parallel,qtconsole]", "ipython[test,test-extra]"] +black = ["black"] +doc = ["docrepr", "exceptiongroup", "intersphinx-registry", "ipykernel", "ipython[test]", "matplotlib", "setuptools (>=18.5)", "sphinx (>=1.3)", "sphinx-rtd-theme", "sphinxcontrib-jquery", "tomli", "typing-extensions"] +kernel = ["ipykernel"] +matplotlib = ["matplotlib"] +nbconvert = ["nbconvert"] +nbformat = ["nbformat"] +notebook = ["ipywidgets", "notebook"] +parallel = ["ipyparallel"] +qtconsole = ["qtconsole"] +test = ["pickleshare", "pytest", "pytest-asyncio (<0.22)", "testpath"] +test-extra = ["curio", "ipython[test]", "matplotlib (!=3.2.0)", "nbformat", "numpy (>=1.23)", "pandas", "trio"] + +[[package]] +name = "jedi" +version = "0.19.1" +description = "An autocompletion tool for Python that can be used for text editors." +optional = false +python-versions = ">=3.6" +files = [ + {file = "jedi-0.19.1-py2.py3-none-any.whl", hash = "sha256:e983c654fe5c02867aef4cdfce5a2fbb4a50adc0af145f70504238f18ef5e7e0"}, + {file = "jedi-0.19.1.tar.gz", hash = "sha256:cf0496f3651bc65d7174ac1b7d043eff454892c708a87d1b683e57b569927ffd"}, +] + +[package.dependencies] +parso = ">=0.8.3,<0.9.0" + +[package.extras] +docs = ["Jinja2 (==2.11.3)", "MarkupSafe (==1.1.1)", "Pygments (==2.8.1)", "alabaster (==0.7.12)", "babel (==2.9.1)", "chardet (==4.0.0)", "commonmark (==0.8.1)", "docutils (==0.17.1)", "future (==0.18.2)", "idna (==2.10)", "imagesize (==1.2.0)", "mock (==1.0.1)", "packaging (==20.9)", "pyparsing (==2.4.7)", "pytz (==2021.1)", "readthedocs-sphinx-ext (==2.1.4)", "recommonmark (==0.5.0)", "requests (==2.25.1)", "six (==1.15.0)", "snowballstemmer (==2.1.0)", "sphinx (==1.8.5)", "sphinx-rtd-theme (==0.4.3)", "sphinxcontrib-serializinghtml (==1.1.4)", "sphinxcontrib-websupport (==1.2.4)", "urllib3 (==1.26.4)"] +qa = ["flake8 (==5.0.4)", "mypy (==0.971)", "types-setuptools (==67.2.0.1)"] +testing = ["Django", "attrs", "colorama", "docopt", "pytest (<7.0.0)"] + +[[package]] +name = "jinja2" +version = "3.1.4" +description = "A very fast and expressive template engine." +optional = false +python-versions = ">=3.7" +files = [ + {file = "jinja2-3.1.4-py3-none-any.whl", hash = "sha256:bc5dd2abb727a5319567b7a813e6a2e7318c39f4f487cfe6c89c6f9c7d25197d"}, + {file = "jinja2-3.1.4.tar.gz", hash = "sha256:4a3aee7acbbe7303aede8e9648d13b8bf88a429282aa6122a993f0ac800cb369"}, +] + +[package.dependencies] +MarkupSafe = ">=2.0" + +[package.extras] +i18n = ["Babel (>=2.7)"] + +[[package]] +name = "markupsafe" +version = "2.1.5" +description = "Safely add untrusted strings to HTML/XML markup." +optional = false +python-versions = ">=3.7" +files = [ + {file = "MarkupSafe-2.1.5-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:a17a92de5231666cfbe003f0e4b9b3a7ae3afb1ec2845aadc2bacc93ff85febc"}, + {file = "MarkupSafe-2.1.5-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:72b6be590cc35924b02c78ef34b467da4ba07e4e0f0454a2c5907f473fc50ce5"}, + {file = "MarkupSafe-2.1.5-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e61659ba32cf2cf1481e575d0462554625196a1f2fc06a1c777d3f48e8865d46"}, + {file = "MarkupSafe-2.1.5-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:2174c595a0d73a3080ca3257b40096db99799265e1c27cc5a610743acd86d62f"}, + {file = "MarkupSafe-2.1.5-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:ae2ad8ae6ebee9d2d94b17fb62763125f3f374c25618198f40cbb8b525411900"}, + {file = "MarkupSafe-2.1.5-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:075202fa5b72c86ad32dc7d0b56024ebdbcf2048c0ba09f1cde31bfdd57bcfff"}, + {file = "MarkupSafe-2.1.5-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:598e3276b64aff0e7b3451b72e94fa3c238d452e7ddcd893c3ab324717456bad"}, + {file = "MarkupSafe-2.1.5-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:fce659a462a1be54d2ffcacea5e3ba2d74daa74f30f5f143fe0c58636e355fdd"}, + {file = "MarkupSafe-2.1.5-cp310-cp310-win32.whl", hash = "sha256:d9fad5155d72433c921b782e58892377c44bd6252b5af2f67f16b194987338a4"}, + {file = "MarkupSafe-2.1.5-cp310-cp310-win_amd64.whl", hash = "sha256:bf50cd79a75d181c9181df03572cdce0fbb75cc353bc350712073108cba98de5"}, + {file = "MarkupSafe-2.1.5-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:629ddd2ca402ae6dbedfceeba9c46d5f7b2a61d9749597d4307f943ef198fc1f"}, + {file = "MarkupSafe-2.1.5-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:5b7b716f97b52c5a14bffdf688f971b2d5ef4029127f1ad7a513973cfd818df2"}, + {file = "MarkupSafe-2.1.5-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:6ec585f69cec0aa07d945b20805be741395e28ac1627333b1c5b0105962ffced"}, + {file = "MarkupSafe-2.1.5-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b91c037585eba9095565a3556f611e3cbfaa42ca1e865f7b8015fe5c7336d5a5"}, + {file = "MarkupSafe-2.1.5-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:7502934a33b54030eaf1194c21c692a534196063db72176b0c4028e140f8f32c"}, + {file = "MarkupSafe-2.1.5-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:0e397ac966fdf721b2c528cf028494e86172b4feba51d65f81ffd65c63798f3f"}, + {file = "MarkupSafe-2.1.5-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:c061bb86a71b42465156a3ee7bd58c8c2ceacdbeb95d05a99893e08b8467359a"}, + {file = "MarkupSafe-2.1.5-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:3a57fdd7ce31c7ff06cdfbf31dafa96cc533c21e443d57f5b1ecc6cdc668ec7f"}, + {file = "MarkupSafe-2.1.5-cp311-cp311-win32.whl", hash = "sha256:397081c1a0bfb5124355710fe79478cdbeb39626492b15d399526ae53422b906"}, + {file = "MarkupSafe-2.1.5-cp311-cp311-win_amd64.whl", hash = "sha256:2b7c57a4dfc4f16f7142221afe5ba4e093e09e728ca65c51f5620c9aaeb9a617"}, + {file = "MarkupSafe-2.1.5-cp312-cp312-macosx_10_9_universal2.whl", hash = "sha256:8dec4936e9c3100156f8a2dc89c4b88d5c435175ff03413b443469c7c8c5f4d1"}, + {file = "MarkupSafe-2.1.5-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:3c6b973f22eb18a789b1460b4b91bf04ae3f0c4234a0a6aa6b0a92f6f7b951d4"}, + {file = "MarkupSafe-2.1.5-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ac07bad82163452a6884fe8fa0963fb98c2346ba78d779ec06bd7a6262132aee"}, + {file = "MarkupSafe-2.1.5-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f5dfb42c4604dddc8e4305050aa6deb084540643ed5804d7455b5df8fe16f5e5"}, + {file = "MarkupSafe-2.1.5-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:ea3d8a3d18833cf4304cd2fc9cbb1efe188ca9b5efef2bdac7adc20594a0e46b"}, + {file = "MarkupSafe-2.1.5-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:d050b3361367a06d752db6ead6e7edeb0009be66bc3bae0ee9d97fb326badc2a"}, + {file = "MarkupSafe-2.1.5-cp312-cp312-musllinux_1_1_i686.whl", hash = "sha256:bec0a414d016ac1a18862a519e54b2fd0fc8bbfd6890376898a6c0891dd82e9f"}, + {file = "MarkupSafe-2.1.5-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:58c98fee265677f63a4385256a6d7683ab1832f3ddd1e66fe948d5880c21a169"}, + {file = "MarkupSafe-2.1.5-cp312-cp312-win32.whl", hash = "sha256:8590b4ae07a35970728874632fed7bd57b26b0102df2d2b233b6d9d82f6c62ad"}, + {file = "MarkupSafe-2.1.5-cp312-cp312-win_amd64.whl", hash = "sha256:823b65d8706e32ad2df51ed89496147a42a2a6e01c13cfb6ffb8b1e92bc910bb"}, + {file = "MarkupSafe-2.1.5-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:c8b29db45f8fe46ad280a7294f5c3ec36dbac9491f2d1c17345be8e69cc5928f"}, + {file = "MarkupSafe-2.1.5-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ec6a563cff360b50eed26f13adc43e61bc0c04d94b8be985e6fb24b81f6dcfdf"}, + {file = "MarkupSafe-2.1.5-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a549b9c31bec33820e885335b451286e2969a2d9e24879f83fe904a5ce59d70a"}, + {file = "MarkupSafe-2.1.5-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:4f11aa001c540f62c6166c7726f71f7573b52c68c31f014c25cc7901deea0b52"}, + {file = "MarkupSafe-2.1.5-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:7b2e5a267c855eea6b4283940daa6e88a285f5f2a67f2220203786dfa59b37e9"}, + {file = "MarkupSafe-2.1.5-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:2d2d793e36e230fd32babe143b04cec8a8b3eb8a3122d2aceb4a371e6b09b8df"}, + {file = "MarkupSafe-2.1.5-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:ce409136744f6521e39fd8e2a24c53fa18ad67aa5bc7c2cf83645cce5b5c4e50"}, + {file = "MarkupSafe-2.1.5-cp37-cp37m-win32.whl", hash = "sha256:4096e9de5c6fdf43fb4f04c26fb114f61ef0bf2e5604b6ee3019d51b69e8c371"}, + {file = "MarkupSafe-2.1.5-cp37-cp37m-win_amd64.whl", hash = "sha256:4275d846e41ecefa46e2015117a9f491e57a71ddd59bbead77e904dc02b1bed2"}, + {file = "MarkupSafe-2.1.5-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:656f7526c69fac7f600bd1f400991cc282b417d17539a1b228617081106feb4a"}, + {file = "MarkupSafe-2.1.5-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:97cafb1f3cbcd3fd2b6fbfb99ae11cdb14deea0736fc2b0952ee177f2b813a46"}, + {file = "MarkupSafe-2.1.5-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:1f3fbcb7ef1f16e48246f704ab79d79da8a46891e2da03f8783a5b6fa41a9532"}, + {file = "MarkupSafe-2.1.5-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:fa9db3f79de01457b03d4f01b34cf91bc0048eb2c3846ff26f66687c2f6d16ab"}, + {file = "MarkupSafe-2.1.5-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:ffee1f21e5ef0d712f9033568f8344d5da8cc2869dbd08d87c84656e6a2d2f68"}, + {file = "MarkupSafe-2.1.5-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:5dedb4db619ba5a2787a94d877bc8ffc0566f92a01c0ef214865e54ecc9ee5e0"}, + {file = "MarkupSafe-2.1.5-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:30b600cf0a7ac9234b2638fbc0fb6158ba5bdcdf46aeb631ead21248b9affbc4"}, + {file = "MarkupSafe-2.1.5-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:8dd717634f5a044f860435c1d8c16a270ddf0ef8588d4887037c5028b859b0c3"}, + {file = "MarkupSafe-2.1.5-cp38-cp38-win32.whl", hash = "sha256:daa4ee5a243f0f20d528d939d06670a298dd39b1ad5f8a72a4275124a7819eff"}, + {file = "MarkupSafe-2.1.5-cp38-cp38-win_amd64.whl", hash = "sha256:619bc166c4f2de5caa5a633b8b7326fbe98e0ccbfacabd87268a2b15ff73a029"}, + {file = "MarkupSafe-2.1.5-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:7a68b554d356a91cce1236aa7682dc01df0edba8d043fd1ce607c49dd3c1edcf"}, + {file = "MarkupSafe-2.1.5-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:db0b55e0f3cc0be60c1f19efdde9a637c32740486004f20d1cff53c3c0ece4d2"}, + {file = "MarkupSafe-2.1.5-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3e53af139f8579a6d5f7b76549125f0d94d7e630761a2111bc431fd820e163b8"}, + {file = "MarkupSafe-2.1.5-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:17b950fccb810b3293638215058e432159d2b71005c74371d784862b7e4683f3"}, + {file = "MarkupSafe-2.1.5-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:4c31f53cdae6ecfa91a77820e8b151dba54ab528ba65dfd235c80b086d68a465"}, + {file = "MarkupSafe-2.1.5-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:bff1b4290a66b490a2f4719358c0cdcd9bafb6b8f061e45c7a2460866bf50c2e"}, + {file = "MarkupSafe-2.1.5-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:bc1667f8b83f48511b94671e0e441401371dfd0f0a795c7daa4a3cd1dde55bea"}, + {file = "MarkupSafe-2.1.5-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:5049256f536511ee3f7e1b3f87d1d1209d327e818e6ae1365e8653d7e3abb6a6"}, + {file = "MarkupSafe-2.1.5-cp39-cp39-win32.whl", hash = "sha256:00e046b6dd71aa03a41079792f8473dc494d564611a8f89bbbd7cb93295ebdcf"}, + {file = "MarkupSafe-2.1.5-cp39-cp39-win_amd64.whl", hash = "sha256:fa173ec60341d6bb97a89f5ea19c85c5643c1e7dedebc22f5181eb73573142c5"}, + {file = "MarkupSafe-2.1.5.tar.gz", hash = "sha256:d283d37a890ba4c1ae73ffadf8046435c76e7bc2247bbb63c00bd1a709c6544b"}, +] + +[[package]] +name = "matplotlib-inline" +version = "0.1.7" +description = "Inline Matplotlib backend for Jupyter" +optional = false +python-versions = ">=3.8" +files = [ + {file = "matplotlib_inline-0.1.7-py3-none-any.whl", hash = "sha256:df192d39a4ff8f21b1895d72e6a13f5fcc5099f00fa84384e0ea28c2cc0653ca"}, + {file = "matplotlib_inline-0.1.7.tar.gz", hash = "sha256:8423b23ec666be3d16e16b60bdd8ac4e86e840ebd1dd11a30b9f117f2fa0ab90"}, +] + +[package.dependencies] +traitlets = "*" + +[[package]] +name = "packaging" +version = "24.1" +description = "Core utilities for Python packages" +optional = false +python-versions = ">=3.8" +files = [ + {file = "packaging-24.1-py3-none-any.whl", hash = "sha256:5b8f2217dbdbd2f7f384c41c628544e6d52f2d0f53c6d0c3ea61aa5d1d7ff124"}, + {file = "packaging-24.1.tar.gz", hash = "sha256:026ed72c8ed3fcce5bf8950572258698927fd1dbda10a5e981cdf0ac37f4f002"}, +] + +[[package]] +name = "parso" +version = "0.8.4" +description = "A Python Parser" +optional = false +python-versions = ">=3.6" +files = [ + {file = "parso-0.8.4-py2.py3-none-any.whl", hash = "sha256:a418670a20291dacd2dddc80c377c5c3791378ee1e8d12bffc35420643d43f18"}, + {file = "parso-0.8.4.tar.gz", hash = "sha256:eb3a7b58240fb99099a345571deecc0f9540ea5f4dd2fe14c2a99d6b281ab92d"}, +] + +[package.extras] +qa = ["flake8 (==5.0.4)", "mypy (==0.971)", "types-setuptools (==67.2.0.1)"] +testing = ["docopt", "pytest"] + +[[package]] +name = "pexpect" +version = "4.9.0" +description = "Pexpect allows easy control of interactive console applications." +optional = false +python-versions = "*" +files = [ + {file = "pexpect-4.9.0-py2.py3-none-any.whl", hash = "sha256:7236d1e080e4936be2dc3e326cec0af72acf9212a7e1d060210e70a47e253523"}, + {file = "pexpect-4.9.0.tar.gz", hash = "sha256:ee7d41123f3c9911050ea2c2dac107568dc43b2d3b0c7557a33212c398ead30f"}, +] + +[package.dependencies] +ptyprocess = ">=0.5" + +[[package]] +name = "pluggy" +version = "1.5.0" +description = "plugin and hook calling mechanisms for python" +optional = false +python-versions = ">=3.8" +files = [ + {file = "pluggy-1.5.0-py3-none-any.whl", hash = "sha256:44e1ad92c8ca002de6377e165f3e0f1be63266ab4d554740532335b9d75ea669"}, + {file = "pluggy-1.5.0.tar.gz", hash = "sha256:2cffa88e94fdc978c4c574f15f9e59b7f4201d439195c3715ca9e2486f1d0cf1"}, +] + +[package.extras] +dev = ["pre-commit", "tox"] +testing = ["pytest", "pytest-benchmark"] + +[[package]] +name = "prompt-toolkit" +version = "3.0.47" +description = "Library for building powerful interactive command lines in Python" +optional = false +python-versions = ">=3.7.0" +files = [ + {file = "prompt_toolkit-3.0.47-py3-none-any.whl", hash = "sha256:0d7bfa67001d5e39d02c224b663abc33687405033a8c422d0d675a5a13361d10"}, + {file = "prompt_toolkit-3.0.47.tar.gz", hash = "sha256:1e1b29cb58080b1e69f207c893a1a7bf16d127a5c30c9d17a25a5d77792e5360"}, +] + +[package.dependencies] +wcwidth = "*" + +[[package]] +name = "ptyprocess" +version = "0.7.0" +description = "Run a subprocess in a pseudo terminal" +optional = false +python-versions = "*" +files = [ + {file = "ptyprocess-0.7.0-py2.py3-none-any.whl", hash = "sha256:4b41f3967fce3af57cc7e94b888626c18bf37a083e3651ca8feeb66d492fef35"}, + {file = "ptyprocess-0.7.0.tar.gz", hash = "sha256:5c5d0a3b48ceee0b48485e0c26037c0acd7d29765ca3fbb5cb3831d347423220"}, +] + +[[package]] +name = "pure-eval" +version = "0.2.2" +description = "Safely evaluate AST nodes without side effects" +optional = false +python-versions = "*" +files = [ + {file = "pure_eval-0.2.2-py3-none-any.whl", hash = "sha256:01eaab343580944bc56080ebe0a674b39ec44a945e6d09ba7db3cb8cec289350"}, + {file = "pure_eval-0.2.2.tar.gz", hash = "sha256:2b45320af6dfaa1750f543d714b6d1c520a1688dec6fd24d339063ce0aaa9ac3"}, +] + +[package.extras] +tests = ["pytest"] + +[[package]] +name = "pygments" +version = "2.18.0" +description = "Pygments is a syntax highlighting package written in Python." +optional = false +python-versions = ">=3.8" +files = [ + {file = "pygments-2.18.0-py3-none-any.whl", hash = "sha256:b8e6aca0523f3ab76fee51799c488e38782ac06eafcf95e7ba832985c8e7b13a"}, + {file = "pygments-2.18.0.tar.gz", hash = "sha256:786ff802f32e91311bff3889f6e9a86e81505fe99f2735bb6d60ae0c5004f199"}, +] + +[package.extras] +windows-terminal = ["colorama (>=0.4.6)"] + +[[package]] +name = "pyjwt" +version = "2.8.0" +description = "JSON Web Token implementation in Python" +optional = false +python-versions = ">=3.7" +files = [ + {file = "PyJWT-2.8.0-py3-none-any.whl", hash = "sha256:59127c392cc44c2da5bb3192169a91f429924e17aff6534d70fdc02ab3e04320"}, + {file = "PyJWT-2.8.0.tar.gz", hash = "sha256:57e28d156e3d5c10088e0c68abb90bfac3df82b40a71bd0daa20c65ccd5c23de"}, +] + +[package.extras] +crypto = ["cryptography (>=3.4.0)"] +dev = ["coverage[toml] (==5.0.4)", "cryptography (>=3.4.0)", "pre-commit", "pytest (>=6.0.0,<7.0.0)", "sphinx (>=4.5.0,<5.0.0)", "sphinx-rtd-theme", "zope.interface"] +docs = ["sphinx (>=4.5.0,<5.0.0)", "sphinx-rtd-theme", "zope.interface"] +tests = ["coverage[toml] (==5.0.4)", "pytest (>=6.0.0,<7.0.0)"] + +[[package]] +name = "pytest" +version = "8.2.2" +description = "pytest: simple powerful testing with Python" +optional = false +python-versions = ">=3.8" +files = [ + {file = "pytest-8.2.2-py3-none-any.whl", hash = "sha256:c434598117762e2bd304e526244f67bf66bbd7b5d6cf22138be51ff661980343"}, + {file = "pytest-8.2.2.tar.gz", hash = "sha256:de4bb8104e201939ccdc688b27a89a7be2079b22e2bd2b07f806b6ba71117977"}, +] + +[package.dependencies] +colorama = {version = "*", markers = "sys_platform == \"win32\""} +exceptiongroup = {version = ">=1.0.0rc8", markers = "python_version < \"3.11\""} +iniconfig = "*" +packaging = "*" +pluggy = ">=1.5,<2.0" +tomli = {version = ">=1", markers = "python_version < \"3.11\""} + +[package.extras] +dev = ["argcomplete", "attrs (>=19.2)", "hypothesis (>=3.56)", "mock", "pygments (>=2.7.2)", "requests", "setuptools", "xmlschema"] + +[[package]] +name = "pyyaml" +version = "6.0.1" +description = "YAML parser and emitter for Python" +optional = false +python-versions = ">=3.6" +files = [ + {file = "PyYAML-6.0.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:d858aa552c999bc8a8d57426ed01e40bef403cd8ccdd0fc5f6f04a00414cac2a"}, + {file = "PyYAML-6.0.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:fd66fc5d0da6d9815ba2cebeb4205f95818ff4b79c3ebe268e75d961704af52f"}, + {file = "PyYAML-6.0.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:69b023b2b4daa7548bcfbd4aa3da05b3a74b772db9e23b982788168117739938"}, + {file = "PyYAML-6.0.1-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:81e0b275a9ecc9c0c0c07b4b90ba548307583c125f54d5b6946cfee6360c733d"}, + {file = "PyYAML-6.0.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ba336e390cd8e4d1739f42dfe9bb83a3cc2e80f567d8805e11b46f4a943f5515"}, + {file = "PyYAML-6.0.1-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:326c013efe8048858a6d312ddd31d56e468118ad4cdeda36c719bf5bb6192290"}, + {file = "PyYAML-6.0.1-cp310-cp310-win32.whl", hash = "sha256:bd4af7373a854424dabd882decdc5579653d7868b8fb26dc7d0e99f823aa5924"}, + {file = "PyYAML-6.0.1-cp310-cp310-win_amd64.whl", hash = "sha256:fd1592b3fdf65fff2ad0004b5e363300ef59ced41c2e6b3a99d4089fa8c5435d"}, + {file = "PyYAML-6.0.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:6965a7bc3cf88e5a1c3bd2e0b5c22f8d677dc88a455344035f03399034eb3007"}, + {file = "PyYAML-6.0.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:f003ed9ad21d6a4713f0a9b5a7a0a79e08dd0f221aff4525a2be4c346ee60aab"}, + {file = "PyYAML-6.0.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:42f8152b8dbc4fe7d96729ec2b99c7097d656dc1213a3229ca5383f973a5ed6d"}, + {file = "PyYAML-6.0.1-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:062582fca9fabdd2c8b54a3ef1c978d786e0f6b3a1510e0ac93ef59e0ddae2bc"}, + {file = "PyYAML-6.0.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d2b04aac4d386b172d5b9692e2d2da8de7bfb6c387fa4f801fbf6fb2e6ba4673"}, + {file = "PyYAML-6.0.1-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:e7d73685e87afe9f3b36c799222440d6cf362062f78be1013661b00c5c6f678b"}, + {file = "PyYAML-6.0.1-cp311-cp311-win32.whl", hash = "sha256:1635fd110e8d85d55237ab316b5b011de701ea0f29d07611174a1b42f1444741"}, + {file = "PyYAML-6.0.1-cp311-cp311-win_amd64.whl", hash = "sha256:bf07ee2fef7014951eeb99f56f39c9bb4af143d8aa3c21b1677805985307da34"}, + {file = "PyYAML-6.0.1-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:855fb52b0dc35af121542a76b9a84f8d1cd886ea97c84703eaa6d88e37a2ad28"}, + {file = "PyYAML-6.0.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:40df9b996c2b73138957fe23a16a4f0ba614f4c0efce1e9406a184b6d07fa3a9"}, + {file = "PyYAML-6.0.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a08c6f0fe150303c1c6b71ebcd7213c2858041a7e01975da3a99aed1e7a378ef"}, + {file = "PyYAML-6.0.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6c22bec3fbe2524cde73d7ada88f6566758a8f7227bfbf93a408a9d86bcc12a0"}, + {file = "PyYAML-6.0.1-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:8d4e9c88387b0f5c7d5f281e55304de64cf7f9c0021a3525bd3b1c542da3b0e4"}, + {file = "PyYAML-6.0.1-cp312-cp312-win32.whl", hash = "sha256:d483d2cdf104e7c9fa60c544d92981f12ad66a457afae824d146093b8c294c54"}, + {file = "PyYAML-6.0.1-cp312-cp312-win_amd64.whl", hash = "sha256:0d3304d8c0adc42be59c5f8a4d9e3d7379e6955ad754aa9d6ab7a398b59dd1df"}, + {file = "PyYAML-6.0.1-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:50550eb667afee136e9a77d6dc71ae76a44df8b3e51e41b77f6de2932bfe0f47"}, + {file = "PyYAML-6.0.1-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:1fe35611261b29bd1de0070f0b2f47cb6ff71fa6595c077e42bd0c419fa27b98"}, + {file = "PyYAML-6.0.1-cp36-cp36m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:704219a11b772aea0d8ecd7058d0082713c3562b4e271b849ad7dc4a5c90c13c"}, + {file = "PyYAML-6.0.1-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:afd7e57eddb1a54f0f1a974bc4391af8bcce0b444685d936840f125cf046d5bd"}, + {file = "PyYAML-6.0.1-cp36-cp36m-win32.whl", hash = "sha256:fca0e3a251908a499833aa292323f32437106001d436eca0e6e7833256674585"}, + {file = "PyYAML-6.0.1-cp36-cp36m-win_amd64.whl", hash = "sha256:f22ac1c3cac4dbc50079e965eba2c1058622631e526bd9afd45fedd49ba781fa"}, + {file = "PyYAML-6.0.1-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:b1275ad35a5d18c62a7220633c913e1b42d44b46ee12554e5fd39c70a243d6a3"}, + {file = "PyYAML-6.0.1-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:18aeb1bf9a78867dc38b259769503436b7c72f7a1f1f4c93ff9a17de54319b27"}, + {file = "PyYAML-6.0.1-cp37-cp37m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:596106435fa6ad000c2991a98fa58eeb8656ef2325d7e158344fb33864ed87e3"}, + {file = "PyYAML-6.0.1-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:baa90d3f661d43131ca170712d903e6295d1f7a0f595074f151c0aed377c9b9c"}, + {file = "PyYAML-6.0.1-cp37-cp37m-win32.whl", hash = "sha256:9046c58c4395dff28dd494285c82ba00b546adfc7ef001486fbf0324bc174fba"}, + {file = "PyYAML-6.0.1-cp37-cp37m-win_amd64.whl", hash = "sha256:4fb147e7a67ef577a588a0e2c17b6db51dda102c71de36f8549b6816a96e1867"}, + {file = "PyYAML-6.0.1-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:1d4c7e777c441b20e32f52bd377e0c409713e8bb1386e1099c2415f26e479595"}, + {file = "PyYAML-6.0.1-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a0cd17c15d3bb3fa06978b4e8958dcdc6e0174ccea823003a106c7d4d7899ac5"}, + {file = "PyYAML-6.0.1-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:28c119d996beec18c05208a8bd78cbe4007878c6dd15091efb73a30e90539696"}, + {file = "PyYAML-6.0.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7e07cbde391ba96ab58e532ff4803f79c4129397514e1413a7dc761ccd755735"}, + {file = "PyYAML-6.0.1-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:49a183be227561de579b4a36efbb21b3eab9651dd81b1858589f796549873dd6"}, + {file = "PyYAML-6.0.1-cp38-cp38-win32.whl", hash = "sha256:184c5108a2aca3c5b3d3bf9395d50893a7ab82a38004c8f61c258d4428e80206"}, + {file = "PyYAML-6.0.1-cp38-cp38-win_amd64.whl", hash = "sha256:1e2722cc9fbb45d9b87631ac70924c11d3a401b2d7f410cc0e3bbf249f2dca62"}, + {file = "PyYAML-6.0.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:9eb6caa9a297fc2c2fb8862bc5370d0303ddba53ba97e71f08023b6cd73d16a8"}, + {file = "PyYAML-6.0.1-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:c8098ddcc2a85b61647b2590f825f3db38891662cfc2fc776415143f599bb859"}, + {file = "PyYAML-6.0.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:5773183b6446b2c99bb77e77595dd486303b4faab2b086e7b17bc6bef28865f6"}, + {file = "PyYAML-6.0.1-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:b786eecbdf8499b9ca1d697215862083bd6d2a99965554781d0d8d1ad31e13a0"}, + {file = "PyYAML-6.0.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:bc1bf2925a1ecd43da378f4db9e4f799775d6367bdb94671027b73b393a7c42c"}, + {file = "PyYAML-6.0.1-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:04ac92ad1925b2cff1db0cfebffb6ffc43457495c9b3c39d3fcae417d7125dc5"}, + {file = "PyYAML-6.0.1-cp39-cp39-win32.whl", hash = "sha256:faca3bdcf85b2fc05d06ff3fbc1f83e1391b3e724afa3feba7d13eeab355484c"}, + {file = "PyYAML-6.0.1-cp39-cp39-win_amd64.whl", hash = "sha256:510c9deebc5c0225e8c96813043e62b680ba2f9c50a08d3724c7f28a747d1486"}, + {file = "PyYAML-6.0.1.tar.gz", hash = "sha256:bfdf460b1736c775f2ba9f6a92bca30bc2095067b8a9d77876d1fad6cc3b4a43"}, +] + +[[package]] +name = "requests" +version = "2.32.3" +description = "Python HTTP for Humans." +optional = false +python-versions = ">=3.8" +files = [ + {file = "requests-2.32.3-py3-none-any.whl", hash = "sha256:70761cfe03c773ceb22aa2f671b4757976145175cdfca038c02654d061d6dcc6"}, + {file = "requests-2.32.3.tar.gz", hash = "sha256:55365417734eb18255590a9ff9eb97e9e1da868d4ccd6402399eaf68af20a760"}, +] + +[package.dependencies] +certifi = ">=2017.4.17" +charset-normalizer = ">=2,<4" +idna = ">=2.5,<4" +urllib3 = ">=1.21.1,<3" + +[package.extras] +socks = ["PySocks (>=1.5.6,!=1.5.7)"] +use-chardet-on-py3 = ["chardet (>=3.0.2,<6)"] + +[[package]] +name = "requests-toolbelt" +version = "1.0.0" +description = "A utility belt for advanced users of python-requests" +optional = false +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" +files = [ + {file = "requests-toolbelt-1.0.0.tar.gz", hash = "sha256:7681a0a3d047012b5bdc0ee37d7f8f07ebe76ab08caeccfc3921ce23c88d5bc6"}, + {file = "requests_toolbelt-1.0.0-py2.py3-none-any.whl", hash = "sha256:cccfdd665f0a24fcf4726e690f65639d272bb0637b9b92dfd91a5568ccf6bd06"}, +] + +[package.dependencies] +requests = ">=2.0.1,<3.0.0" + +[[package]] +name = "ruff" +version = "0.4.9" +description = "An extremely fast Python linter and code formatter, written in Rust." +optional = false +python-versions = ">=3.7" +files = [ + {file = "ruff-0.4.9-py3-none-macosx_10_12_x86_64.whl", hash = "sha256:b262ed08d036ebe162123170b35703aaf9daffecb698cd367a8d585157732991"}, + {file = "ruff-0.4.9-py3-none-macosx_11_0_arm64.whl", hash = "sha256:98ec2775fd2d856dc405635e5ee4ff177920f2141b8e2d9eb5bd6efd50e80317"}, + {file = "ruff-0.4.9-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:4555056049d46d8a381f746680db1c46e67ac3b00d714606304077682832998e"}, + {file = "ruff-0.4.9-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:e91175fbe48f8a2174c9aad70438fe9cb0a5732c4159b2a10a3565fea2d94cde"}, + {file = "ruff-0.4.9-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:0e8e7b95673f22e0efd3571fb5b0cf71a5eaaa3cc8a776584f3b2cc878e46bff"}, + {file = "ruff-0.4.9-py3-none-manylinux_2_17_ppc64.manylinux2014_ppc64.whl", hash = "sha256:2d45ddc6d82e1190ea737341326ecbc9a61447ba331b0a8962869fcada758505"}, + {file = "ruff-0.4.9-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:78de3fdb95c4af084087628132336772b1c5044f6e710739d440fc0bccf4d321"}, + {file = "ruff-0.4.9-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:06b60f91bfa5514bb689b500a25ba48e897d18fea14dce14b48a0c40d1635893"}, + {file = "ruff-0.4.9-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:88bffe9c6a454bf8529f9ab9091c99490578a593cc9f9822b7fc065ee0712a06"}, + {file = "ruff-0.4.9-py3-none-musllinux_1_2_aarch64.whl", hash = "sha256:673bddb893f21ab47a8334c8e0ea7fd6598ecc8e698da75bcd12a7b9d0a3206e"}, + {file = "ruff-0.4.9-py3-none-musllinux_1_2_armv7l.whl", hash = "sha256:8c1aff58c31948cc66d0b22951aa19edb5af0a3af40c936340cd32a8b1ab7438"}, + {file = "ruff-0.4.9-py3-none-musllinux_1_2_i686.whl", hash = "sha256:784d3ec9bd6493c3b720a0b76f741e6c2d7d44f6b2be87f5eef1ae8cc1d54c84"}, + {file = "ruff-0.4.9-py3-none-musllinux_1_2_x86_64.whl", hash = "sha256:732dd550bfa5d85af8c3c6cbc47ba5b67c6aed8a89e2f011b908fc88f87649db"}, + {file = "ruff-0.4.9-py3-none-win32.whl", hash = "sha256:8064590fd1a50dcf4909c268b0e7c2498253273309ad3d97e4a752bb9df4f521"}, + {file = "ruff-0.4.9-py3-none-win_amd64.whl", hash = "sha256:e0a22c4157e53d006530c902107c7f550b9233e9706313ab57b892d7197d8e52"}, + {file = "ruff-0.4.9-py3-none-win_arm64.whl", hash = "sha256:5d5460f789ccf4efd43f265a58538a2c24dbce15dbf560676e430375f20a8198"}, + {file = "ruff-0.4.9.tar.gz", hash = "sha256:f1cb0828ac9533ba0135d148d214e284711ede33640465e706772645483427e3"}, +] + +[[package]] +name = "six" +version = "1.16.0" +description = "Python 2 and 3 compatibility utilities" +optional = false +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*" +files = [ + {file = "six-1.16.0-py2.py3-none-any.whl", hash = "sha256:8abb2f1d86890a2dfb989f9a77cfcfd3e47c2a354b01111771326f8aa26e0254"}, + {file = "six-1.16.0.tar.gz", hash = "sha256:1e61c37477a1626458e36f7b1d82aa5c9b094fa4802892072e49de9c60c4c926"}, +] + +[[package]] +name = "snowballstemmer" +version = "2.2.0" +description = "This package provides 29 stemmers for 28 languages generated from Snowball algorithms." +optional = false +python-versions = "*" +files = [ + {file = "snowballstemmer-2.2.0-py2.py3-none-any.whl", hash = "sha256:c8e1716e83cc398ae16824e5572ae04e0d9fc2c6b985fb0f900f5f0c96ecba1a"}, + {file = "snowballstemmer-2.2.0.tar.gz", hash = "sha256:09b16deb8547d3412ad7b590689584cd0fe25ec8db3be37788be3810cbf19cb1"}, +] + +[[package]] +name = "sphinx" +version = "7.3.7" +description = "Python documentation generator" +optional = false +python-versions = ">=3.9" +files = [ + {file = "sphinx-7.3.7-py3-none-any.whl", hash = "sha256:413f75440be4cacf328f580b4274ada4565fb2187d696a84970c23f77b64d8c3"}, + {file = "sphinx-7.3.7.tar.gz", hash = "sha256:a4a7db75ed37531c05002d56ed6948d4c42f473a36f46e1382b0bd76ca9627bc"}, +] + +[package.dependencies] +alabaster = ">=0.7.14,<0.8.0" +babel = ">=2.9" +colorama = {version = ">=0.4.5", markers = "sys_platform == \"win32\""} +docutils = ">=0.18.1,<0.22" +imagesize = ">=1.3" +Jinja2 = ">=3.0" +packaging = ">=21.0" +Pygments = ">=2.14" +requests = ">=2.25.0" +snowballstemmer = ">=2.0" +sphinxcontrib-applehelp = "*" +sphinxcontrib-devhelp = "*" +sphinxcontrib-htmlhelp = ">=2.0.0" +sphinxcontrib-jsmath = "*" +sphinxcontrib-qthelp = "*" +sphinxcontrib-serializinghtml = ">=1.1.9" +tomli = {version = ">=2", markers = "python_version < \"3.11\""} + +[package.extras] +docs = ["sphinxcontrib-websupport"] +lint = ["flake8 (>=3.5.0)", "importlib_metadata", "mypy (==1.9.0)", "pytest (>=6.0)", "ruff (==0.3.7)", "sphinx-lint", "tomli", "types-docutils", "types-requests"] +test = ["cython (>=3.0)", "defusedxml (>=0.7.1)", "pytest (>=6.0)", "setuptools (>=67.0)"] + +[[package]] +name = "sphinx-rtd-theme" +version = "2.0.0" +description = "Read the Docs theme for Sphinx" +optional = false +python-versions = ">=3.6" +files = [ + {file = "sphinx_rtd_theme-2.0.0-py2.py3-none-any.whl", hash = "sha256:ec93d0856dc280cf3aee9a4c9807c60e027c7f7b461b77aeffed682e68f0e586"}, + {file = "sphinx_rtd_theme-2.0.0.tar.gz", hash = "sha256:bd5d7b80622406762073a04ef8fadc5f9151261563d47027de09910ce03afe6b"}, +] + +[package.dependencies] +docutils = "<0.21" +sphinx = ">=5,<8" +sphinxcontrib-jquery = ">=4,<5" + +[package.extras] +dev = ["bump2version", "sphinxcontrib-httpdomain", "transifex-client", "wheel"] + +[[package]] +name = "sphinxcontrib-applehelp" +version = "1.0.8" +description = "sphinxcontrib-applehelp is a Sphinx extension which outputs Apple help books" +optional = false +python-versions = ">=3.9" +files = [ + {file = "sphinxcontrib_applehelp-1.0.8-py3-none-any.whl", hash = "sha256:cb61eb0ec1b61f349e5cc36b2028e9e7ca765be05e49641c97241274753067b4"}, + {file = "sphinxcontrib_applehelp-1.0.8.tar.gz", hash = "sha256:c40a4f96f3776c4393d933412053962fac2b84f4c99a7982ba42e09576a70619"}, +] + +[package.extras] +lint = ["docutils-stubs", "flake8", "mypy"] +standalone = ["Sphinx (>=5)"] +test = ["pytest"] + +[[package]] +name = "sphinxcontrib-devhelp" +version = "1.0.6" +description = "sphinxcontrib-devhelp is a sphinx extension which outputs Devhelp documents" +optional = false +python-versions = ">=3.9" +files = [ + {file = "sphinxcontrib_devhelp-1.0.6-py3-none-any.whl", hash = "sha256:6485d09629944511c893fa11355bda18b742b83a2b181f9a009f7e500595c90f"}, + {file = "sphinxcontrib_devhelp-1.0.6.tar.gz", hash = "sha256:9893fd3f90506bc4b97bdb977ceb8fbd823989f4316b28c3841ec128544372d3"}, +] + +[package.extras] +lint = ["docutils-stubs", "flake8", "mypy"] +standalone = ["Sphinx (>=5)"] +test = ["pytest"] + +[[package]] +name = "sphinxcontrib-htmlhelp" +version = "2.0.5" +description = "sphinxcontrib-htmlhelp is a sphinx extension which renders HTML help files" +optional = false +python-versions = ">=3.9" +files = [ + {file = "sphinxcontrib_htmlhelp-2.0.5-py3-none-any.whl", hash = "sha256:393f04f112b4d2f53d93448d4bce35842f62b307ccdc549ec1585e950bc35e04"}, + {file = "sphinxcontrib_htmlhelp-2.0.5.tar.gz", hash = "sha256:0dc87637d5de53dd5eec3a6a01753b1ccf99494bd756aafecd74b4fa9e729015"}, +] + +[package.extras] +lint = ["docutils-stubs", "flake8", "mypy"] +standalone = ["Sphinx (>=5)"] +test = ["html5lib", "pytest"] + +[[package]] +name = "sphinxcontrib-jquery" +version = "4.1" +description = "Extension to include jQuery on newer Sphinx releases" +optional = false +python-versions = ">=2.7" +files = [ + {file = "sphinxcontrib-jquery-4.1.tar.gz", hash = "sha256:1620739f04e36a2c779f1a131a2dfd49b2fd07351bf1968ced074365933abc7a"}, + {file = "sphinxcontrib_jquery-4.1-py2.py3-none-any.whl", hash = "sha256:f936030d7d0147dd026a4f2b5a57343d233f1fc7b363f68b3d4f1cb0993878ae"}, +] + +[package.dependencies] +Sphinx = ">=1.8" + +[[package]] +name = "sphinxcontrib-jsmath" +version = "1.0.1" +description = "A sphinx extension which renders display math in HTML via JavaScript" +optional = false +python-versions = ">=3.5" +files = [ + {file = "sphinxcontrib-jsmath-1.0.1.tar.gz", hash = "sha256:a9925e4a4587247ed2191a22df5f6970656cb8ca2bd6284309578f2153e0c4b8"}, + {file = "sphinxcontrib_jsmath-1.0.1-py2.py3-none-any.whl", hash = "sha256:2ec2eaebfb78f3f2078e73666b1415417a116cc848b72e5172e596c871103178"}, +] + +[package.extras] +test = ["flake8", "mypy", "pytest"] + +[[package]] +name = "sphinxcontrib-qthelp" +version = "1.0.7" +description = "sphinxcontrib-qthelp is a sphinx extension which outputs QtHelp documents" +optional = false +python-versions = ">=3.9" +files = [ + {file = "sphinxcontrib_qthelp-1.0.7-py3-none-any.whl", hash = "sha256:e2ae3b5c492d58fcbd73281fbd27e34b8393ec34a073c792642cd8e529288182"}, + {file = "sphinxcontrib_qthelp-1.0.7.tar.gz", hash = "sha256:053dedc38823a80a7209a80860b16b722e9e0209e32fea98c90e4e6624588ed6"}, +] + +[package.extras] +lint = ["docutils-stubs", "flake8", "mypy"] +standalone = ["Sphinx (>=5)"] +test = ["pytest"] + +[[package]] +name = "sphinxcontrib-serializinghtml" +version = "1.1.10" +description = "sphinxcontrib-serializinghtml is a sphinx extension which outputs \"serialized\" HTML files (json and pickle)" +optional = false +python-versions = ">=3.9" +files = [ + {file = "sphinxcontrib_serializinghtml-1.1.10-py3-none-any.whl", hash = "sha256:326369b8df80a7d2d8d7f99aa5ac577f51ea51556ed974e7716cfd4fca3f6cb7"}, + {file = "sphinxcontrib_serializinghtml-1.1.10.tar.gz", hash = "sha256:93f3f5dc458b91b192fe10c397e324f262cf163d79f3282c158e8436a2c4511f"}, +] + +[package.extras] +lint = ["docutils-stubs", "flake8", "mypy"] +standalone = ["Sphinx (>=5)"] +test = ["pytest"] + +[[package]] +name = "stack-data" +version = "0.6.3" +description = "Extract data from python stack frames and tracebacks for informative displays" +optional = false +python-versions = "*" +files = [ + {file = "stack_data-0.6.3-py3-none-any.whl", hash = "sha256:d5558e0c25a4cb0853cddad3d77da9891a08cb85dd9f9f91b9f8cd66e511e695"}, + {file = "stack_data-0.6.3.tar.gz", hash = "sha256:836a778de4fec4dcd1dcd89ed8abff8a221f58308462e1c4aa2a3cf30148f0b9"}, +] + +[package.dependencies] +asttokens = ">=2.1.0" +executing = ">=1.2.0" +pure-eval = "*" + +[package.extras] +tests = ["cython", "littleutils", "pygments", "pytest", "typeguard"] + +[[package]] +name = "tomli" +version = "2.0.1" +description = "A lil' TOML parser" +optional = false +python-versions = ">=3.7" +files = [ + {file = "tomli-2.0.1-py3-none-any.whl", hash = "sha256:939de3e7a6161af0c887ef91b7d41a53e7c5a1ca976325f429cb46ea9bc30ecc"}, + {file = "tomli-2.0.1.tar.gz", hash = "sha256:de526c12914f0c550d15924c62d72abc48d6fe7364aa87328337a31007fe8a4f"}, +] + +[[package]] +name = "traitlets" +version = "5.14.3" +description = "Traitlets Python configuration system" +optional = false +python-versions = ">=3.8" +files = [ + {file = "traitlets-5.14.3-py3-none-any.whl", hash = "sha256:b74e89e397b1ed28cc831db7aea759ba6640cb3de13090ca145426688ff1ac4f"}, + {file = "traitlets-5.14.3.tar.gz", hash = "sha256:9ed0579d3502c94b4b3732ac120375cda96f923114522847de4b3bb98b96b6b7"}, +] + +[package.extras] +docs = ["myst-parser", "pydata-sphinx-theme", "sphinx"] +test = ["argcomplete (>=3.0.3)", "mypy (>=1.7.0)", "pre-commit", "pytest (>=7.0,<8.2)", "pytest-mock", "pytest-mypy-testing"] + +[[package]] +name = "typing-extensions" +version = "4.12.2" +description = "Backported and Experimental Type Hints for Python 3.8+" +optional = false +python-versions = ">=3.8" +files = [ + {file = "typing_extensions-4.12.2-py3-none-any.whl", hash = "sha256:04e5ca0351e0f3f85c6853954072df659d0d13fac324d0072316b67d7794700d"}, + {file = "typing_extensions-4.12.2.tar.gz", hash = "sha256:1a7ead55c7e559dd4dee8856e3a88b41225abfe1ce8df57b7c13915fe121ffb8"}, +] + +[[package]] +name = "urllib3" +version = "2.2.2" +description = "HTTP library with thread-safe connection pooling, file post, and more." +optional = false +python-versions = ">=3.8" +files = [ + {file = "urllib3-2.2.2-py3-none-any.whl", hash = "sha256:a448b2f64d686155468037e1ace9f2d2199776e17f0a46610480d311f73e3472"}, + {file = "urllib3-2.2.2.tar.gz", hash = "sha256:dd505485549a7a552833da5e6063639d0d177c04f23bc3864e41e5dc5f612168"}, +] + +[package.extras] +brotli = ["brotli (>=1.0.9)", "brotlicffi (>=0.8.0)"] +h2 = ["h2 (>=4,<5)"] +socks = ["pysocks (>=1.5.6,!=1.5.7,<2.0)"] +zstd = ["zstandard (>=0.18.0)"] + +[[package]] +name = "versioneer" +version = "0.29" +description = "Easy VCS-based management of project version strings" +optional = false +python-versions = ">=3.7" +files = [ + {file = "versioneer-0.29-py3-none-any.whl", hash = "sha256:0f1a137bb5d6811e96a79bb0486798aeae9b9c6efc24b389659cebb0ee396cb9"}, + {file = "versioneer-0.29.tar.gz", hash = "sha256:5ab283b9857211d61b53318b7c792cf68e798e765ee17c27ade9f6c924235731"}, +] + +[package.extras] +toml = ["tomli"] + +[[package]] +name = "wcwidth" +version = "0.2.13" +description = "Measures the displayed width of unicode strings in a terminal" +optional = false +python-versions = "*" +files = [ + {file = "wcwidth-0.2.13-py2.py3-none-any.whl", hash = "sha256:3da69048e4540d84af32131829ff948f1e022c1c6bdb8d6102117aac784f6859"}, + {file = "wcwidth-0.2.13.tar.gz", hash = "sha256:72ea0c06399eb286d978fdedb6923a9eb47e1c486ce63e9b4e64fc18303972b5"}, +] + +[metadata] +lock-version = "2.0" +python-versions = "^3.10" +content-hash = "d54a2bd575343d14409d52aeae6e6b2d69bf73a73ce7d530c49be288ab2efff7" diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..20f9e7a --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,87 @@ +[tool.poetry] +name = "WebexPythonSDK" +version = "0.0.0" +description = "Work with the Webex APIs in native Python!" +authors = ["Chris Lunsford "] +license = "MIT" +readme = "README.rst" +homepage = "https://github.com/WebexCommunity/WebexPythonSDK" +repository = "https://github.com/WebexCommunity/WebexPythonSDK" +documentation = "https://webexpythonsdk.readthedocs.io" +include = ["LICENSE", "README.rst"] +keywords = ["cisco", "webex", "api", "sdk", "python"] +classifiers = [ + "Development Status :: 5 - Production/Stable", + "License :: OSI Approved :: MIT License", + "Programming Language :: Python :: Implementation :: CPython", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "Natural Language :: English", + "Intended Audience :: Developers", + "Intended Audience :: System Administrators", + "Intended Audience :: Information Technology", + "Intended Audience :: Telecommunications Industry", + "Topic :: Communications", + "Topic :: Communications :: Chat", + "Topic :: Communications :: Conferencing", + "Topic :: Software Development :: Libraries :: Python Modules", +] + +[tool.poetry.dependencies] +python = "^3.10" +requests = "^2.32.3" +requests-toolbelt = "^1.0.0" +PyJWT = "^2.8.0" + +[tool.poetry.group.dev.dependencies] +versioneer = "^0.29" +PyYAML = "^6.0.1" +ruff = "^0.4.9" +pytest = "^8.2.2" +ipython = "^8.25.0" + +[tool.poetry.group.docs.dependencies] +sphinx = "^7.3.7" +sphinx-rtd-theme = "^2.0.0" + +[build-system] +requires = ["poetry-core", "versioneer[toml]"] +build-backend = "poetry.core.masonry.api" + +[tool.versioneer] +VCS = "git" +style = "pep440-post" +versionfile_source = "src/WebexPythonSDK/_version.py" +versionfile_build = "WebexPythonSDK/_version.py" +tag_prefix = "v" +parentdir_prefix = "WebexPythonSDK-" + +[tool.pytest.ini_options] +addopts = "--strict-markers" +markers = ["slow", "manual"] + +[tool.ruff] +line-length = 79 +extend-exclude = [ + "versioneer.py", + "src/WebexPythonSDK/_version.py", + "generator/**", +] + +[tool.ruff.lint] +# B: flake8-bugbear +# Q: flake8-quotes +extend-select = [ "B", "Q", "W" ] +ignore-init-module-imports = true +ignore = [ + # E402 module level import not at top of file + "E402", + # F401 'builtins.*' imported but unused + "F401", + # F403 'from builtins import *' used; unable to detect undefined names + "F403", + # F405 'unicode' may be undefined, or defined from star imports: builtins + "F405", +] diff --git a/pytest.ini b/pytest.ini deleted file mode 100644 index 5969799..0000000 --- a/pytest.ini +++ /dev/null @@ -1,5 +0,0 @@ -[pytest] -addopts = --strict-markers -markers = - slow: marks tests as slow (deselect with '-m "not slow"') - manual: marks tests as manual (deselect with '-m "not manual"') diff --git a/requirements.lock b/requirements.lock deleted file mode 100644 index fe71e67..0000000 --- a/requirements.lock +++ /dev/null @@ -1,70 +0,0 @@ -alabaster==0.7.16 -asttokens==2.4.1 -Babel==2.14.0 -backports.tarfile==1.1.0 -certifi==2024.2.2 -charset-normalizer==3.3.2 -decorator==5.1.1 -docutils==0.20.1 -exceptiongroup==1.2.0 -executing==2.0.1 -flake8==7.0.0 -future==1.0.0 -idna==3.7 -imagesize==1.4.1 -importlib_metadata==7.1.0 -iniconfig==2.0.0 -ipython==8.23.0 -jaraco.classes==3.4.0 -jaraco.context==5.3.0 -jaraco.functools==4.0.0 -jedi==0.19.1 -Jinja2==3.1.3 -keyring==25.1.0 -markdown-it-py==3.0.0 -MarkupSafe==2.1.5 -matplotlib-inline==0.1.7 -mccabe==0.7.0 -mdurl==0.1.2 -more-itertools==10.2.0 -nh3==0.2.17 -packaging==24.0 -parso==0.8.4 -pexpect==4.9.0 -pkginfo==1.10.0 -pluggy==1.4.0 -prompt-toolkit==3.0.43 -ptyprocess==0.7.0 -pure-eval==0.2.2 -pycodestyle==2.11.1 -pyflakes==3.2.0 -Pygments==2.17.2 -PyJWT==1.7.1 -pytest==8.1.1 -PyYAML==6.0.1 -readme_renderer==43.0 -requests==2.31.0 -requests-toolbelt==1.0.0 -rfc3986==2.0.0 -rich==13.7.1 -six==1.16.0 -snowballstemmer==2.2.0 -Sphinx==7.3.5 -sphinx-rtd-theme==2.0.0 -sphinxcontrib-applehelp==1.0.8 -sphinxcontrib-devhelp==1.0.6 -sphinxcontrib-htmlhelp==2.0.5 -sphinxcontrib-jquery==4.1 -sphinxcontrib-jsmath==1.0.1 -sphinxcontrib-qthelp==1.0.7 -sphinxcontrib-serializinghtml==1.1.10 -stack-data==0.6.3 -tomli==2.0.1 -traitlets==5.14.2 -twine==5.0.0 -typing_extensions==4.11.0 -urllib3==2.2.1 -versioneer==0.29 -wcwidth==0.2.13 --e git+https://github.com/CiscoDevNet/webexteamssdk.git@f7d0e1338a3e765721e1d1e66cca87c7d4527ca3#egg=webexteamssdk -zipp==3.18.1 diff --git a/requirements.txt b/requirements.txt deleted file mode 100644 index fd0f7ab..0000000 --- a/requirements.txt +++ /dev/null @@ -1,7 +0,0 @@ -versioneer -Sphinx>=1.8.0 -sphinx-rtd-theme -pytest -flake8 -twine -ipython diff --git a/setup.cfg b/setup.cfg deleted file mode 100644 index 66d1da7..0000000 --- a/setup.cfg +++ /dev/null @@ -1,5 +0,0 @@ -[versioneer] -VCS = git -style = pep440-post -versionfile_source = webexteamssdk/_version.py -tag_prefix = v diff --git a/setup.py b/setup.py deleted file mode 100644 index babd589..0000000 --- a/setup.py +++ /dev/null @@ -1,86 +0,0 @@ -# -*- coding: utf-8 -*- -"""webexteamssdk setup module.""" - -import os -from codecs import open - -from setuptools import find_packages, setup - -import versioneer - - -__copyright__ = "Copyright (c) 2016-2024 Cisco and/or its affiliates." -__license__ = "MIT" - - -PACKAGE_NAME = "webexteamssdk" - -PACKAGE_KEYWORDS = [ - "cisco", - "webex", - "teams", - "spark", - "python", - "api", - "sdk", - "enterprise", - "messaging", -] - -PACKAGE_CLASSIFIERS = [ - "Development Status :: 5 - Production/Stable", - "Intended Audience :: Developers", - "Intended Audience :: System Administrators", - "Intended Audience :: Telecommunications Industry", - "Intended Audience :: Education", - "Natural Language :: English", - "License :: OSI Approved :: MIT License", - "Programming Language :: Python :: 2", - "Programming Language :: Python :: 2.7", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.10", - "Topic :: Communications", - "Topic :: Communications :: Chat", -] - -# TODO: Review the the dependencies when releasing WebexPythonSDK v2 -# PyJWT should be updated to ^2.8.0. Keeping it at 1.7.1 to maintain python v2 -# compatibility for now. -INSTALLATION_REQUIREMENTS = [ - "future", - "requests>=2.4.2", - "requests-toolbelt", - "PyJWT==1.7.1", -] - - -project_root = os.path.abspath(os.path.dirname(__file__)) - - -# Get package metadata -metadata = {} -with open(os.path.join(project_root, PACKAGE_NAME, "_metadata.py")) as f: - exec(f.read(), metadata) - - -# Get the long description from the project's README.rst file -with open(os.path.join(project_root, "README.rst"), encoding="utf-8") as f: - long_description = f.read() - - -setup( - name=PACKAGE_NAME, - version=versioneer.get_version(), - cmdclass=versioneer.get_cmdclass(), - description=metadata["__description__"], - long_description=long_description, - url=metadata["__url__"], - download_url=metadata["__download_url__"], - author=metadata["__author__"], - author_email=metadata["__author_email__"], - license=metadata["__license__"] + "; " + metadata["__copyright__"], - classifiers=PACKAGE_CLASSIFIERS, - keywords=" ".join(PACKAGE_KEYWORDS), - packages=find_packages(include=[PACKAGE_NAME, PACKAGE_NAME + ".*"]), - install_requires=INSTALLATION_REQUIREMENTS, -) diff --git a/versioneer.py b/versioneer.py deleted file mode 100644 index 5edd4e4..0000000 --- a/versioneer.py +++ /dev/null @@ -1,1903 +0,0 @@ -# Version: 0.18 - -"""The Versioneer - like a rocketeer, but for versions. - -The Versioneer -============== - -* like a rocketeer, but for versions! -* https://github.com/warner/python-versioneer -* Brian Warner -* License: Public Domain -* Compatible With: python2.6, 2.7, 3.2, 3.3, 3.4, 3.5, 3.6, and pypy -* [![Latest Version] -(https://pypip.in/version/versioneer/badge.svg?style=flat) -](https://pypi.python.org/pypi/versioneer/) -* [![Build Status] -(https://travis-ci.org/warner/python-versioneer.png?branch=master) -](https://travis-ci.org/warner/python-versioneer) - -This is a tool for managing a recorded version number in distutils-based -python projects. The goal is to remove the tedious and error-prone "update -the embedded version string" step from your release process. Making a new -release should be as easy as recording a new tag in your version-control -system, and maybe making new tarballs. - - -## Quick Install - -* `pip install versioneer` to somewhere to your $PATH -* add a `[versioneer]` section to your setup.cfg (see below) -* run `versioneer install` in your source tree, commit the results - -## Version Identifiers - -Source trees come from a variety of places: - -* a version-control system checkout (mostly used by developers) -* a nightly tarball, produced by build automation -* a snapshot tarball, produced by a web-based VCS browser, like github's - "tarball from tag" feature -* a release tarball, produced by "setup.py sdist", distributed through PyPI - -Within each source tree, the version identifier (either a string or a number, -this tool is format-agnostic) can come from a variety of places: - -* ask the VCS tool itself, e.g. "git describe" (for checkouts), which knows - about recent "tags" and an absolute revision-id -* the name of the directory into which the tarball was unpacked -* an expanded VCS keyword ($Id$, etc) -* a `_version.py` created by some earlier build step - -For released software, the version identifier is closely related to a VCS -tag. Some projects use tag names that include more than just the version -string (e.g. "myproject-1.2" instead of just "1.2"), in which case the tool -needs to strip the tag prefix to extract the version identifier. For -unreleased software (between tags), the version identifier should provide -enough information to help developers recreate the same tree, while also -giving them an idea of roughly how old the tree is (after version 1.2, before -version 1.3). Many VCS systems can report a description that captures this, -for example `git describe --tags --dirty --always` reports things like -"0.7-1-g574ab98-dirty" to indicate that the checkout is one revision past the -0.7 tag, has a unique revision id of "574ab98", and is "dirty" (it has -uncommitted changes. - -The version identifier is used for multiple purposes: - -* to allow the module to self-identify its version: `myproject.__version__` -* to choose a name and prefix for a 'setup.py sdist' tarball - -## Theory of Operation - -Versioneer works by adding a special `_version.py` file into your source -tree, where your `__init__.py` can import it. This `_version.py` knows how to -dynamically ask the VCS tool for version information at import time. - -`_version.py` also contains `$Revision$` markers, and the installation -process marks `_version.py` to have this marker rewritten with a tag name -during the `git archive` command. As a result, generated tarballs will -contain enough information to get the proper version. - -To allow `setup.py` to compute a version too, a `versioneer.py` is added to -the top level of your source tree, next to `setup.py` and the `setup.cfg` -that configures it. This overrides several distutils/setuptools commands to -compute the version when invoked, and changes `setup.py build` and `setup.py -sdist` to replace `_version.py` with a small static file that contains just -the generated version data. - -## Installation - -See [INSTALL.md](./INSTALL.md) for detailed installation instructions. - -## Version-String Flavors - -Code which uses Versioneer can learn about its version string at runtime by -importing `_version` from your main `__init__.py` file and running the -`get_versions()` function. From the "outside" (e.g. in `setup.py`), you can -import the top-level `versioneer.py` and run `get_versions()`. - -Both functions return a dictionary with different flavors of version -information: - -* `['version']`: A condensed version string, rendered using the selected - style. This is the most commonly used value for the project's version - string. The default "pep440" style yields strings like `0.11`, - `0.11+2.g1076c97`, or `0.11+2.g1076c97.dirty`. See the "Styles" section - below for alternative styles. - -* `['full-revisionid']`: detailed revision identifier. For Git, this is the - full SHA1 commit id, e.g. "1076c978a8d3cfc70f408fe5974aa6c092c949ac". - -* `['date']`: Date and time of the latest `HEAD` commit. For Git, it is the - commit date in ISO 8601 format. This will be None if the date is not - available. - -* `['dirty']`: a boolean, True if the tree has uncommitted changes. Note that - this is only accurate if run in a VCS checkout, otherwise it is likely to - be False or None - -* `['error']`: if the version string could not be computed, this will be set - to a string describing the problem, otherwise it will be None. It may be - useful to throw an exception in setup.py if this is set, to avoid e.g. - creating tarballs with a version string of "unknown". - -Some variants are more useful than others. Including `full-revisionid` in a -bug report should allow developers to reconstruct the exact code being tested -(or indicate the presence of local changes that should be shared with the -developers). `version` is suitable for display in an "about" box or a CLI -`--version` output: it can be easily compared against release notes and lists -of bugs fixed in various releases. - -The installer adds the following text to your `__init__.py` to place a basic -version in `YOURPROJECT.__version__`: - - from ._version import get_versions - __version__ = get_versions()['version'] - del get_versions - -## Styles - -The setup.cfg `style=` configuration controls how the VCS information is -rendered into a version string. - -The default style, "pep440", produces a PEP440-compliant string, equal to the -un-prefixed tag name for actual releases, and containing an additional "local -version" section with more detail for in-between builds. For Git, this is -TAG[+DISTANCE.gHEX[.dirty]] , using information from `git describe --tags ---dirty --always`. For example "0.11+2.g1076c97.dirty" indicates that the -tree is like the "1076c97" commit but has uncommitted changes (".dirty"), and -that this commit is two revisions ("+2") beyond the "0.11" tag. For released -software (exactly equal to a known tag), the identifier will only contain the -stripped tag, e.g. "0.11". - -Other styles are available. See [details.md](details.md) in the Versioneer -source tree for descriptions. - -## Debugging - -Versioneer tries to avoid fatal errors: if something goes wrong, it will tend -to return a version of "0+unknown". To investigate the problem, run `setup.py -version`, which will run the version-lookup code in a verbose mode, and will -display the full contents of `get_versions()` (including the `error` string, -which may help identify what went wrong). - -## Known Limitations - -Some situations are known to cause problems for Versioneer. This details the -most significant ones. More can be found on Github -[issues page](https://github.com/warner/python-versioneer/issues). - -### Subprojects - -Versioneer has limited support for source trees in which `setup.py` is not in -the root directory (e.g. `setup.py` and `.git/` are *not* siblings). The are -two common reasons why `setup.py` might not be in the root: - -* Source trees which contain multiple subprojects, such as - [Buildbot](https://github.com/buildbot/buildbot), which contains both - "master" and "slave" subprojects, each with their own `setup.py`, - `setup.cfg`, and `tox.ini`. Projects like these produce multiple PyPI - distributions (and upload multiple independently-installable tarballs). -* Source trees whose main purpose is to contain a C library, but which also - provide bindings to Python (and perhaps other langauges) in subdirectories. - -Versioneer will look for `.git` in parent directories, and most operations -should get the right version string. However `pip` and `setuptools` have bugs -and implementation details which frequently cause `pip install .` from a -subproject directory to fail to find a correct version string (so it usually -defaults to `0+unknown`). - -`pip install --editable .` should work correctly. `setup.py install` might -work too. - -Pip-8.1.1 is known to have this problem, but hopefully it will get fixed in -some later version. - -[Bug #38](https://github.com/warner/python-versioneer/issues/38) is tracking -this issue. The discussion in -[PR #61](https://github.com/warner/python-versioneer/pull/61) describes the -issue from the Versioneer side in more detail. -[pip PR#3176](https://github.com/pypa/pip/pull/3176) and -[pip PR#3615](https://github.com/pypa/pip/pull/3615) contain work to improve -pip to let Versioneer work correctly. - -Versioneer-0.16 and earlier only looked for a `.git` directory next to the -`setup.cfg`, so subprojects were completely unsupported with those releases. - -### Editable installs with setuptools <= 18.5 - -`setup.py develop` and `pip install --editable .` allow you to install a -project into a virtualenv once, then continue editing the source code (and -test) without re-installing after every change. - -"Entry-point scripts" (`setup(entry_points={"console_scripts": ..})`) are a -convenient way to specify executable scripts that should be installed along -with the python package. - -These both work as expected when using modern setuptools. When using -setuptools-18.5 or earlier, however, certain operations will cause -`pkg_resources.DistributionNotFound` errors when running the entrypoint -script, which must be resolved by re-installing the package. This happens -when the install happens with one version, then the egg_info data is -regenerated while a different version is checked out. Many setup.py commands -cause egg_info to be rebuilt (including `sdist`, `wheel`, and installing into -a different virtualenv), so this can be surprising. - -[Bug #83](https://github.com/warner/python-versioneer/issues/83) describes -this one, but upgrading to a newer version of setuptools should probably -resolve it. - -### Unicode version strings - -While Versioneer works (and is continually tested) with both Python 2 and -Python 3, it is not entirely consistent with bytes-vs-unicode distinctions. -Newer releases probably generate unicode version strings on py2. It's not -clear that this is wrong, but it may be surprising for applications when then -write these strings to a network connection or include them in bytes-oriented -APIs like cryptographic checksums. - -[Bug #71](https://github.com/warner/python-versioneer/issues/71) investigates -this question. - - -## Updating Versioneer - -To upgrade your project to a new release of Versioneer, do the following: - -* install the new Versioneer (`pip install -U versioneer` or equivalent) -* edit `setup.cfg`, if necessary, to include any new configuration settings - indicated by the release notes. See [UPGRADING](./UPGRADING.md) for details. -* re-run `versioneer install` in your source tree, to replace - `SRC/_version.py` -* commit any changed files - -## Future Directions - -This tool is designed to make it easily extended to other version-control -systems: all VCS-specific components are in separate directories like -src/git/ . The top-level `versioneer.py` script is assembled from these -components by running make-versioneer.py . In the future, make-versioneer.py -will take a VCS name as an argument, and will construct a version of -`versioneer.py` that is specific to the given VCS. It might also take the -configuration arguments that are currently provided manually during -installation by editing setup.py . Alternatively, it might go the other -direction and include code from all supported VCS systems, reducing the -number of intermediate scripts. - - -## License - -To make Versioneer easier to embed, all its code is dedicated to the public -domain. The `_version.py` that it creates is also in the public domain. -Specifically, both are released under the Creative Commons "Public Domain -Dedication" license (CC0-1.0), as described in -https://creativecommons.org/publicdomain/zero/1.0/ . - -""" - -from __future__ import print_function - -try: - import configparser -except ImportError: - import ConfigParser as configparser -import errno -import json -import os -import re -import subprocess -import sys - - -class VersioneerConfig: - """Container for Versioneer configuration parameters.""" - - -def get_root(): - """Get the project root directory. - - We require that all commands are run from the project root, i.e. the - directory that contains setup.py, setup.cfg, and versioneer.py . - """ - root = os.path.realpath(os.path.abspath(os.getcwd())) - setup_py = os.path.join(root, "setup.py") - versioneer_py = os.path.join(root, "versioneer.py") - if not (os.path.exists(setup_py) or os.path.exists(versioneer_py)): - # allow 'python path/to/setup.py COMMAND' - root = os.path.dirname(os.path.realpath(os.path.abspath(sys.argv[0]))) - setup_py = os.path.join(root, "setup.py") - versioneer_py = os.path.join(root, "versioneer.py") - if not (os.path.exists(setup_py) or os.path.exists(versioneer_py)): - err = ( - "Versioneer was unable to run the project root directory. " - "Versioneer requires setup.py to be executed from " - "its immediate directory (like 'python setup.py COMMAND'), " - "or in a way that lets it use sys.argv[0] to find the root " - "(like 'python path/to/setup.py COMMAND')." - ) - raise VersioneerBadRootError(err) - try: - # Certain runtime workflows (setup.py install/develop in a setuptools - # tree) execute all dependencies in a single python process, so - # "versioneer" may be imported multiple times, and python's shared - # module-import table will cache the first one. So we can't use - # os.path.dirname(__file__), as that will find whichever - # versioneer.py was first imported, even in later projects. - me = os.path.realpath(os.path.abspath(__file__)) - me_dir = os.path.normcase(os.path.splitext(me)[0]) - vsr_dir = os.path.normcase(os.path.splitext(versioneer_py)[0]) - if me_dir != vsr_dir: - print( - "Warning: build in %s is using versioneer.py from %s" - % (os.path.dirname(me), versioneer_py) - ) - except NameError: - pass - return root - - -def get_config_from_root(root): - """Read the project setup.cfg file to determine Versioneer config.""" - # This might raise EnvironmentError (if setup.cfg is missing), or - # configparser.NoSectionError (if it lacks a [versioneer] section), or - # configparser.NoOptionError (if it lacks "VCS="). See the docstring at - # the top of versioneer.py for instructions on writing your setup.cfg . - setup_cfg = os.path.join(root, "setup.cfg") - parser = configparser.ConfigParser() - with open(setup_cfg, "r") as f: - parser.read_file(f) - VCS = parser.get("versioneer", "VCS") # mandatory - - def get(parser, name): - if parser.has_option("versioneer", name): - return parser.get("versioneer", name) - return None - - cfg = VersioneerConfig() - cfg.VCS = VCS - cfg.style = get(parser, "style") or "" - cfg.versionfile_source = get(parser, "versionfile_source") - cfg.versionfile_build = get(parser, "versionfile_build") - cfg.tag_prefix = get(parser, "tag_prefix") - if cfg.tag_prefix in ("''", '""'): - cfg.tag_prefix = "" - cfg.parentdir_prefix = get(parser, "parentdir_prefix") - cfg.verbose = get(parser, "verbose") - return cfg - - -class NotThisMethod(Exception): - """Exception raised if a method is not valid for the current scenario.""" - - -# these dictionaries contain VCS-specific tools -LONG_VERSION_PY = {} -HANDLERS = {} - - -def register_vcs_handler(vcs, method): # decorator - """Decorator to mark a method as the handler for a particular VCS.""" - - def decorate(f): - """Store f in HANDLERS[vcs][method].""" - if vcs not in HANDLERS: - HANDLERS[vcs] = {} - HANDLERS[vcs][method] = f - return f - - return decorate - - -def run_command( - commands, args, cwd=None, verbose=False, hide_stderr=False, env=None -): - """Call the given command(s).""" - assert isinstance(commands, list) - p = None - for c in commands: - try: - dispcmd = str([c] + args) - # remember shell=False, so use git.cmd on windows, not just git - p = subprocess.Popen( - [c] + args, - cwd=cwd, - env=env, - stdout=subprocess.PIPE, - stderr=(subprocess.PIPE if hide_stderr else None), - ) - break - except EnvironmentError: - e = sys.exc_info()[1] - if e.errno == errno.ENOENT: - continue - if verbose: - print("unable to run %s" % dispcmd) - print(e) - return None, None - else: - if verbose: - print("unable to find command, tried %s" % (commands,)) - return None, None - stdout = p.communicate()[0].strip() - if sys.version_info[0] >= 3: - stdout = stdout.decode() - if p.returncode != 0: - if verbose: - print("unable to run %s (error)" % dispcmd) - print("stdout was %s" % stdout) - return None, p.returncode - return stdout, p.returncode - - -LONG_VERSION_PY[ - "git" -] = ''' -# This file helps to compute a version number in source trees obtained from -# git-archive tarball (such as those provided by githubs download-from-tag -# feature). Distribution tarballs (built by setup.py sdist) and build -# directories (produced by setup.py build) will contain a much shorter file -# that just contains the computed version number. - -# This file is released into the public domain. Generated by -# versioneer-0.18 (https://github.com/warner/python-versioneer) - -"""Git implementation of _version.py.""" - -import errno -import os -import re -import subprocess -import sys - - -def get_keywords(): - """Get the keywords needed to look up the version information.""" - # these strings will be replaced by git during git-archive. - # setup.py/versioneer.py will grep for the variable names, so they must - # each be defined on a line of their own. _version.py will just call - # get_keywords(). - git_refnames = "%(DOLLAR)sFormat:%%d%(DOLLAR)s" - git_full = "%(DOLLAR)sFormat:%%H%(DOLLAR)s" - git_date = "%(DOLLAR)sFormat:%%ci%(DOLLAR)s" - keywords = {"refnames": git_refnames, "full": git_full, "date": git_date} - return keywords - - -class VersioneerConfig: - """Container for Versioneer configuration parameters.""" - - -def get_config(): - """Create, populate and return the VersioneerConfig() object.""" - # these strings are filled in when 'setup.py versioneer' creates - # _version.py - cfg = VersioneerConfig() - cfg.VCS = "git" - cfg.style = "%(STYLE)s" - cfg.tag_prefix = "%(TAG_PREFIX)s" - cfg.parentdir_prefix = "%(PARENTDIR_PREFIX)s" - cfg.versionfile_source = "%(VERSIONFILE_SOURCE)s" - cfg.verbose = False - return cfg - - -class NotThisMethod(Exception): - """Exception raised if a method is not valid for the current scenario.""" - - -LONG_VERSION_PY = {} -HANDLERS = {} - - -def register_vcs_handler(vcs, method): # decorator - """Decorator to mark a method as the handler for a particular VCS.""" - def decorate(f): - """Store f in HANDLERS[vcs][method].""" - if vcs not in HANDLERS: - HANDLERS[vcs] = {} - HANDLERS[vcs][method] = f - return f - return decorate - - -def run_command(commands, args, cwd=None, verbose=False, hide_stderr=False, - env=None): - """Call the given command(s).""" - assert isinstance(commands, list) - p = None - for c in commands: - try: - dispcmd = str([c] + args) - # remember shell=False, so use git.cmd on windows, not just git - p = subprocess.Popen([c] + args, cwd=cwd, env=env, - stdout=subprocess.PIPE, - stderr=(subprocess.PIPE if hide_stderr - else None)) - break - except EnvironmentError: - e = sys.exc_info()[1] - if e.errno == errno.ENOENT: - continue - if verbose: - print("unable to run %%s" %% dispcmd) - print(e) - return None, None - else: - if verbose: - print("unable to find command, tried %%s" %% (commands,)) - return None, None - stdout = p.communicate()[0].strip() - if sys.version_info[0] >= 3: - stdout = stdout.decode() - if p.returncode != 0: - if verbose: - print("unable to run %%s (error)" %% dispcmd) - print("stdout was %%s" %% stdout) - return None, p.returncode - return stdout, p.returncode - - -def versions_from_parentdir(parentdir_prefix, root, verbose): - """Try to determine the version from the parent directory name. - - Source tarballs conventionally unpack into a directory that includes both - the project name and a version string. We will also support searching up - two directory levels for an appropriately named parent directory - """ - rootdirs = [] - - for i in range(3): - dirname = os.path.basename(root) - if dirname.startswith(parentdir_prefix): - return {"version": dirname[len(parentdir_prefix):], - "full-revisionid": None, - "dirty": False, "error": None, "date": None} - else: - rootdirs.append(root) - root = os.path.dirname(root) # up a level - - if verbose: - print("Tried directories %%s but none started with prefix %%s" %% - (str(rootdirs), parentdir_prefix)) - raise NotThisMethod("rootdir doesn't start with parentdir_prefix") - - -@register_vcs_handler("git", "get_keywords") -def git_get_keywords(versionfile_abs): - """Extract version information from the given file.""" - # the code embedded in _version.py can just fetch the value of these - # keywords. When used from setup.py, we don't want to import _version.py, - # so we do it with a regexp instead. This function is not used from - # _version.py. - keywords = {} - try: - f = open(versionfile_abs, "r") - for line in f.readlines(): - if line.strip().startswith("git_refnames ="): - mo = re.search(r'=\s*"(.*)"', line) - if mo: - keywords["refnames"] = mo.group(1) - if line.strip().startswith("git_full ="): - mo = re.search(r'=\s*"(.*)"', line) - if mo: - keywords["full"] = mo.group(1) - if line.strip().startswith("git_date ="): - mo = re.search(r'=\s*"(.*)"', line) - if mo: - keywords["date"] = mo.group(1) - f.close() - except EnvironmentError: - pass - return keywords - - -@register_vcs_handler("git", "keywords") -def git_versions_from_keywords(keywords, tag_prefix, verbose): - """Get version information from git keywords.""" - if not keywords: - raise NotThisMethod("no keywords at all, weird") - date = keywords.get("date") - if date is not None: - # git-2.2.0 added "%%cI", which expands to an ISO-8601 -compliant - # datestamp. However we prefer "%%ci" (which expands to an "ISO-8601 - # -like" string, which we must then edit to make compliant), because - # it's been around since git-1.5.3, and it's too difficult to - # discover which version we're using, or to work around using an - # older one. - date = date.strip().replace(" ", "T", 1).replace(" ", "", 1) - refnames = keywords["refnames"].strip() - if refnames.startswith("$Format"): - if verbose: - print("keywords are unexpanded, not using") - raise NotThisMethod("unexpanded keywords, not a git-archive tarball") - refs = set([r.strip() for r in refnames.strip("()").split(",")]) - # starting in git-1.8.3, tags are listed as "tag: foo-1.0" instead of - # just "foo-1.0". If we see a "tag: " prefix, prefer those. - TAG = "tag: " - tags = set([r[len(TAG):] for r in refs if r.startswith(TAG)]) - if not tags: - # Either we're using git < 1.8.3, or there really are no tags. We use - # a heuristic: assume all version tags have a digit. The old git %%d - # expansion behaves like git log --decorate=short and strips out the - # refs/heads/ and refs/tags/ prefixes that would let us distinguish - # between branches and tags. By ignoring refnames without digits, we - # filter out many common branch names like "release" and - # "stabilization", as well as "HEAD" and "master". - tags = set([r for r in refs if re.search(r'\d', r)]) - if verbose: - print("discarding '%%s', no digits" %% ",".join(refs - tags)) - if verbose: - print("likely tags: %%s" %% ",".join(sorted(tags))) - for ref in sorted(tags): - # sorting will prefer e.g. "2.0" over "2.0rc1" - if ref.startswith(tag_prefix): - r = ref[len(tag_prefix):] - if verbose: - print("picking %%s" %% r) - return {"version": r, - "full-revisionid": keywords["full"].strip(), - "dirty": False, "error": None, - "date": date} - # no suitable tags, so version is "0+unknown", but full hex is still there - if verbose: - print("no suitable tags, using unknown + full revision id") - return {"version": "0+unknown", - "full-revisionid": keywords["full"].strip(), - "dirty": False, "error": "no suitable tags", "date": None} - - -@register_vcs_handler("git", "pieces_from_vcs") -def git_pieces_from_vcs(tag_prefix, root, verbose, run_command=run_command): - """Get version from 'git describe' in the root of the source tree. - - This only gets called if the git-archive 'subst' keywords were *not* - expanded, and _version.py hasn't already been rewritten with a short - version string, meaning we're inside a checked out source tree. - """ - GITS = ["git"] - if sys.platform == "win32": - GITS = ["git.cmd", "git.exe"] - - out, rc = run_command(GITS, ["rev-parse", "--git-dir"], cwd=root, - hide_stderr=True) - if rc != 0: - if verbose: - print("Directory %%s not under git control" %% root) - raise NotThisMethod("'git rev-parse --git-dir' returned error") - - # if there is a tag matching tag_prefix, this yields TAG-NUM-gHEX[-dirty] - # if there isn't one, this yields HEX[-dirty] (no NUM) - describe_out, rc = run_command(GITS, ["describe", "--tags", "--dirty", - "--always", "--long", - "--match", "%%s*" %% tag_prefix], - cwd=root) - # --long was added in git-1.5.5 - if describe_out is None: - raise NotThisMethod("'git describe' failed") - describe_out = describe_out.strip() - full_out, rc = run_command(GITS, ["rev-parse", "HEAD"], cwd=root) - if full_out is None: - raise NotThisMethod("'git rev-parse' failed") - full_out = full_out.strip() - - pieces = {} - pieces["long"] = full_out - pieces["short"] = full_out[:7] # maybe improved later - pieces["error"] = None - - # parse describe_out. It will be like TAG-NUM-gHEX[-dirty] or HEX[-dirty] - # TAG might have hyphens. - git_describe = describe_out - - # look for -dirty suffix - dirty = git_describe.endswith("-dirty") - pieces["dirty"] = dirty - if dirty: - git_describe = git_describe[:git_describe.rindex("-dirty")] - - # now we have TAG-NUM-gHEX or HEX - - if "-" in git_describe: - # TAG-NUM-gHEX - mo = re.search(r'^(.+)-(\d+)-g([0-9a-f]+)$', git_describe) - if not mo: - # unparseable. Maybe git-describe is misbehaving? - pieces["error"] = ("unable to parse git-describe output: '%%s'" - %% describe_out) - return pieces - - # tag - full_tag = mo.group(1) - if not full_tag.startswith(tag_prefix): - if verbose: - fmt = "tag '%%s' doesn't start with prefix '%%s'" - print(fmt %% (full_tag, tag_prefix)) - pieces["error"] = ("tag '%%s' doesn't start with prefix '%%s'" - %% (full_tag, tag_prefix)) - return pieces - pieces["closest-tag"] = full_tag[len(tag_prefix):] - - # distance: number of commits since tag - pieces["distance"] = int(mo.group(2)) - - # commit: short hex revision ID - pieces["short"] = mo.group(3) - - else: - # HEX: no tags - pieces["closest-tag"] = None - count_out, rc = run_command(GITS, ["rev-list", "HEAD", "--count"], - cwd=root) - pieces["distance"] = int(count_out) # total number of commits - - # commit date: see ISO-8601 comment in git_versions_from_keywords() - date = run_command(GITS, ["show", "-s", "--format=%%ci", "HEAD"], - cwd=root)[0].strip() - pieces["date"] = date.strip().replace(" ", "T", 1).replace(" ", "", 1) - - return pieces - - -def plus_or_dot(pieces): - """Return a + if we don't already have one, else return a .""" - if "+" in pieces.get("closest-tag", ""): - return "." - return "+" - - -def render_pep440(pieces): - """Build up version string, with post-release "local version identifier". - - Our goal: TAG[+DISTANCE.gHEX[.dirty]] . Note that if you - get a tagged build and then dirty it, you'll get TAG+0.gHEX.dirty - - Exceptions: - 1: no tags. git_describe was just HEX. 0+untagged.DISTANCE.gHEX[.dirty] - """ - if pieces["closest-tag"]: - rendered = pieces["closest-tag"] - if pieces["distance"] or pieces["dirty"]: - rendered += plus_or_dot(pieces) - rendered += "%%d.g%%s" %% (pieces["distance"], pieces["short"]) - if pieces["dirty"]: - rendered += ".dirty" - else: - # exception #1 - rendered = "0+untagged.%%d.g%%s" %% (pieces["distance"], - pieces["short"]) - if pieces["dirty"]: - rendered += ".dirty" - return rendered - - -def render_pep440_pre(pieces): - """TAG[.post.devDISTANCE] -- No -dirty. - - Exceptions: - 1: no tags. 0.post.devDISTANCE - """ - if pieces["closest-tag"]: - rendered = pieces["closest-tag"] - if pieces["distance"]: - rendered += ".post.dev%%d" %% pieces["distance"] - else: - # exception #1 - rendered = "0.post.dev%%d" %% pieces["distance"] - return rendered - - -def render_pep440_post(pieces): - """TAG[.postDISTANCE[.dev0]+gHEX] . - - The ".dev0" means dirty. Note that .dev0 sorts backwards - (a dirty tree will appear "older" than the corresponding clean one), - but you shouldn't be releasing software with -dirty anyways. - - Exceptions: - 1: no tags. 0.postDISTANCE[.dev0] - """ - if pieces["closest-tag"]: - rendered = pieces["closest-tag"] - if pieces["distance"] or pieces["dirty"]: - rendered += ".post%%d" %% pieces["distance"] - if pieces["dirty"]: - rendered += ".dev0" - rendered += plus_or_dot(pieces) - rendered += "g%%s" %% pieces["short"] - else: - # exception #1 - rendered = "0.post%%d" %% pieces["distance"] - if pieces["dirty"]: - rendered += ".dev0" - rendered += "+g%%s" %% pieces["short"] - return rendered - - -def render_pep440_old(pieces): - """TAG[.postDISTANCE[.dev0]] . - - The ".dev0" means dirty. - - Eexceptions: - 1: no tags. 0.postDISTANCE[.dev0] - """ - if pieces["closest-tag"]: - rendered = pieces["closest-tag"] - if pieces["distance"] or pieces["dirty"]: - rendered += ".post%%d" %% pieces["distance"] - if pieces["dirty"]: - rendered += ".dev0" - else: - # exception #1 - rendered = "0.post%%d" %% pieces["distance"] - if pieces["dirty"]: - rendered += ".dev0" - return rendered - - -def render_git_describe(pieces): - """TAG[-DISTANCE-gHEX][-dirty]. - - Like 'git describe --tags --dirty --always'. - - Exceptions: - 1: no tags. HEX[-dirty] (note: no 'g' prefix) - """ - if pieces["closest-tag"]: - rendered = pieces["closest-tag"] - if pieces["distance"]: - rendered += "-%%d-g%%s" %% (pieces["distance"], pieces["short"]) - else: - # exception #1 - rendered = pieces["short"] - if pieces["dirty"]: - rendered += "-dirty" - return rendered - - -def render_git_describe_long(pieces): - """TAG-DISTANCE-gHEX[-dirty]. - - Like 'git describe --tags --dirty --always -long'. - The distance/hash is unconditional. - - Exceptions: - 1: no tags. HEX[-dirty] (note: no 'g' prefix) - """ - if pieces["closest-tag"]: - rendered = pieces["closest-tag"] - rendered += "-%%d-g%%s" %% (pieces["distance"], pieces["short"]) - else: - # exception #1 - rendered = pieces["short"] - if pieces["dirty"]: - rendered += "-dirty" - return rendered - - -def render(pieces, style): - """Render the given version pieces into the requested style.""" - if pieces["error"]: - return {"version": "unknown", - "full-revisionid": pieces.get("long"), - "dirty": None, - "error": pieces["error"], - "date": None} - - if not style or style == "default": - style = "pep440" # the default - - if style == "pep440": - rendered = render_pep440(pieces) - elif style == "pep440-pre": - rendered = render_pep440_pre(pieces) - elif style == "pep440-post": - rendered = render_pep440_post(pieces) - elif style == "pep440-old": - rendered = render_pep440_old(pieces) - elif style == "git-describe": - rendered = render_git_describe(pieces) - elif style == "git-describe-long": - rendered = render_git_describe_long(pieces) - else: - raise ValueError("unknown style '%%s'" %% style) - - return {"version": rendered, "full-revisionid": pieces["long"], - "dirty": pieces["dirty"], "error": None, - "date": pieces.get("date")} - - -def get_versions(): - """Get version information or return default if unable to do so.""" - # I am in _version.py, which lives at ROOT/VERSIONFILE_SOURCE. If we have - # __file__, we can work backwards from there to the root. Some - # py2exe/bbfreeze/non-CPython implementations don't do __file__, in which - # case we can only use expanded keywords. - - cfg = get_config() - verbose = cfg.verbose - - try: - return git_versions_from_keywords(get_keywords(), cfg.tag_prefix, - verbose) - except NotThisMethod: - pass - - try: - root = os.path.realpath(__file__) - # versionfile_source is the relative path from the top of the source - # tree (where the .git directory might live) to this file. Invert - # this to find the root from __file__. - for i in cfg.versionfile_source.split('/'): - root = os.path.dirname(root) - except NameError: - return {"version": "0+unknown", "full-revisionid": None, - "dirty": None, - "error": "unable to find root of source tree", - "date": None} - - try: - pieces = git_pieces_from_vcs(cfg.tag_prefix, root, verbose) - return render(pieces, cfg.style) - except NotThisMethod: - pass - - try: - if cfg.parentdir_prefix: - return versions_from_parentdir(cfg.parentdir_prefix, root, verbose) - except NotThisMethod: - pass - - return {"version": "0+unknown", "full-revisionid": None, - "dirty": None, - "error": "unable to compute version", "date": None} -''' - - -@register_vcs_handler("git", "get_keywords") -def git_get_keywords(versionfile_abs): - """Extract version information from the given file.""" - # the code embedded in _version.py can just fetch the value of these - # keywords. When used from setup.py, we don't want to import _version.py, - # so we do it with a regexp instead. This function is not used from - # _version.py. - keywords = {} - try: - f = open(versionfile_abs, "r") - for line in f.readlines(): - if line.strip().startswith("git_refnames ="): - mo = re.search(r'=\s*"(.*)"', line) - if mo: - keywords["refnames"] = mo.group(1) - if line.strip().startswith("git_full ="): - mo = re.search(r'=\s*"(.*)"', line) - if mo: - keywords["full"] = mo.group(1) - if line.strip().startswith("git_date ="): - mo = re.search(r'=\s*"(.*)"', line) - if mo: - keywords["date"] = mo.group(1) - f.close() - except EnvironmentError: - pass - return keywords - - -@register_vcs_handler("git", "keywords") -def git_versions_from_keywords(keywords, tag_prefix, verbose): - """Get version information from git keywords.""" - if not keywords: - raise NotThisMethod("no keywords at all, weird") - date = keywords.get("date") - if date is not None: - # git-2.2.0 added "%cI", which expands to an ISO-8601 -compliant - # datestamp. However we prefer "%ci" (which expands to an "ISO-8601 - # -like" string, which we must then edit to make compliant), because - # it's been around since git-1.5.3, and it's too difficult to - # discover which version we're using, or to work around using an - # older one. - date = date.strip().replace(" ", "T", 1).replace(" ", "", 1) - refnames = keywords["refnames"].strip() - if refnames.startswith("$Format"): - if verbose: - print("keywords are unexpanded, not using") - raise NotThisMethod("unexpanded keywords, not a git-archive tarball") - refs = set([r.strip() for r in refnames.strip("()").split(",")]) - # starting in git-1.8.3, tags are listed as "tag: foo-1.0" instead of - # just "foo-1.0". If we see a "tag: " prefix, prefer those. - TAG = "tag: " - tags = set([r[len(TAG) :] for r in refs if r.startswith(TAG)]) - if not tags: - # Either we're using git < 1.8.3, or there really are no tags. We use - # a heuristic: assume all version tags have a digit. The old git %d - # expansion behaves like git log --decorate=short and strips out the - # refs/heads/ and refs/tags/ prefixes that would let us distinguish - # between branches and tags. By ignoring refnames without digits, we - # filter out many common branch names like "release" and - # "stabilization", as well as "HEAD" and "master". - tags = set([r for r in refs if re.search(r"\d", r)]) - if verbose: - print("discarding '%s', no digits" % ",".join(refs - tags)) - if verbose: - print("likely tags: %s" % ",".join(sorted(tags))) - for ref in sorted(tags): - # sorting will prefer e.g. "2.0" over "2.0rc1" - if ref.startswith(tag_prefix): - r = ref[len(tag_prefix) :] - if verbose: - print("picking %s" % r) - return { - "version": r, - "full-revisionid": keywords["full"].strip(), - "dirty": False, - "error": None, - "date": date, - } - # no suitable tags, so version is "0+unknown", but full hex is still there - if verbose: - print("no suitable tags, using unknown + full revision id") - return { - "version": "0+unknown", - "full-revisionid": keywords["full"].strip(), - "dirty": False, - "error": "no suitable tags", - "date": None, - } - - -@register_vcs_handler("git", "pieces_from_vcs") -def git_pieces_from_vcs(tag_prefix, root, verbose, run_command=run_command): - """Get version from 'git describe' in the root of the source tree. - - This only gets called if the git-archive 'subst' keywords were *not* - expanded, and _version.py hasn't already been rewritten with a short - version string, meaning we're inside a checked out source tree. - """ - GITS = ["git"] - if sys.platform == "win32": - GITS = ["git.cmd", "git.exe"] - - out, rc = run_command( - GITS, ["rev-parse", "--git-dir"], cwd=root, hide_stderr=True - ) - if rc != 0: - if verbose: - print("Directory %s not under git control" % root) - raise NotThisMethod("'git rev-parse --git-dir' returned error") - - # if there is a tag matching tag_prefix, this yields TAG-NUM-gHEX[-dirty] - # if there isn't one, this yields HEX[-dirty] (no NUM) - describe_out, rc = run_command( - GITS, - [ - "describe", - "--tags", - "--dirty", - "--always", - "--long", - "--match", - "%s*" % tag_prefix, - ], - cwd=root, - ) - # --long was added in git-1.5.5 - if describe_out is None: - raise NotThisMethod("'git describe' failed") - describe_out = describe_out.strip() - full_out, rc = run_command(GITS, ["rev-parse", "HEAD"], cwd=root) - if full_out is None: - raise NotThisMethod("'git rev-parse' failed") - full_out = full_out.strip() - - pieces = {} - pieces["long"] = full_out - pieces["short"] = full_out[:7] # maybe improved later - pieces["error"] = None - - # parse describe_out. It will be like TAG-NUM-gHEX[-dirty] or HEX[-dirty] - # TAG might have hyphens. - git_describe = describe_out - - # look for -dirty suffix - dirty = git_describe.endswith("-dirty") - pieces["dirty"] = dirty - if dirty: - git_describe = git_describe[: git_describe.rindex("-dirty")] - - # now we have TAG-NUM-gHEX or HEX - - if "-" in git_describe: - # TAG-NUM-gHEX - mo = re.search(r"^(.+)-(\d+)-g([0-9a-f]+)$", git_describe) - if not mo: - # unparseable. Maybe git-describe is misbehaving? - pieces["error"] = ( - "unable to parse git-describe output: '%s'" % describe_out - ) - return pieces - - # tag - full_tag = mo.group(1) - if not full_tag.startswith(tag_prefix): - if verbose: - fmt = "tag '%s' doesn't start with prefix '%s'" - print(fmt % (full_tag, tag_prefix)) - pieces["error"] = "tag '%s' doesn't start with prefix '%s'" % ( - full_tag, - tag_prefix, - ) - return pieces - pieces["closest-tag"] = full_tag[len(tag_prefix) :] - - # distance: number of commits since tag - pieces["distance"] = int(mo.group(2)) - - # commit: short hex revision ID - pieces["short"] = mo.group(3) - - else: - # HEX: no tags - pieces["closest-tag"] = None - count_out, rc = run_command( - GITS, ["rev-list", "HEAD", "--count"], cwd=root - ) - pieces["distance"] = int(count_out) # total number of commits - - # commit date: see ISO-8601 comment in git_versions_from_keywords() - date = run_command(GITS, ["show", "-s", "--format=%ci", "HEAD"], cwd=root)[ - 0 - ].strip() - pieces["date"] = date.strip().replace(" ", "T", 1).replace(" ", "", 1) - - return pieces - - -def do_vcs_install(manifest_in, versionfile_source, ipy): - """Git-specific installation logic for Versioneer. - - For Git, this means creating/changing .gitattributes to mark _version.py - for export-subst keyword substitution. - """ - GITS = ["git"] - if sys.platform == "win32": - GITS = ["git.cmd", "git.exe"] - files = [manifest_in, versionfile_source] - if ipy: - files.append(ipy) - try: - me = __file__ - if me.endswith(".pyc") or me.endswith(".pyo"): - me = os.path.splitext(me)[0] + ".py" - versioneer_file = os.path.relpath(me) - except NameError: - versioneer_file = "versioneer.py" - files.append(versioneer_file) - present = False - try: - f = open(".gitattributes", "r") - for line in f.readlines(): - if line.strip().startswith(versionfile_source): - if "export-subst" in line.strip().split()[1:]: - present = True - f.close() - except EnvironmentError: - pass - if not present: - f = open(".gitattributes", "a+") - f.write("%s export-subst\n" % versionfile_source) - f.close() - files.append(".gitattributes") - run_command(GITS, ["add", "--"] + files) - - -def versions_from_parentdir(parentdir_prefix, root, verbose): - """Try to determine the version from the parent directory name. - - Source tarballs conventionally unpack into a directory that includes both - the project name and a version string. We will also support searching up - two directory levels for an appropriately named parent directory - """ - rootdirs = [] - - for i in range(3): - dirname = os.path.basename(root) - if dirname.startswith(parentdir_prefix): - return { - "version": dirname[len(parentdir_prefix) :], - "full-revisionid": None, - "dirty": False, - "error": None, - "date": None, - } - else: - rootdirs.append(root) - root = os.path.dirname(root) # up a level - - if verbose: - print( - "Tried directories %s but none started with prefix %s" - % (str(rootdirs), parentdir_prefix) - ) - raise NotThisMethod("rootdir doesn't start with parentdir_prefix") - - -SHORT_VERSION_PY = """ -# This file was generated by 'versioneer.py' (0.18) from -# revision-control system data, or from the parent directory name of an -# unpacked source archive. Distribution tarballs contain a pre-generated copy -# of this file. - -import json - -version_json = ''' -%s -''' # END VERSION_JSON - - -def get_versions(): - return json.loads(version_json) -""" - - -def versions_from_file(filename): - """Try to determine the version from _version.py if present.""" - try: - with open(filename) as f: - contents = f.read() - except EnvironmentError: - raise NotThisMethod("unable to read _version.py") - mo = re.search( - r"version_json = '''\n(.*)''' # END VERSION_JSON", - contents, - re.M | re.S, - ) - if not mo: - mo = re.search( - r"version_json = '''\r\n(.*)''' # END VERSION_JSON", - contents, - re.M | re.S, - ) - if not mo: - raise NotThisMethod("no version_json in _version.py") - return json.loads(mo.group(1)) - - -def write_to_version_file(filename, versions): - """Write the given version number to the given _version.py file.""" - os.unlink(filename) - contents = json.dumps( - versions, sort_keys=True, indent=1, separators=(",", ": ") - ) - with open(filename, "w") as f: - f.write(SHORT_VERSION_PY % contents) - - print("set %s to '%s'" % (filename, versions["version"])) - - -def plus_or_dot(pieces): - """Return a + if we don't already have one, else return a .""" - if "+" in pieces.get("closest-tag", ""): - return "." - return "+" - - -def render_pep440(pieces): - """Build up version string, with post-release "local version identifier". - - Our goal: TAG[+DISTANCE.gHEX[.dirty]] . Note that if you - get a tagged build and then dirty it, you'll get TAG+0.gHEX.dirty - - Exceptions: - 1: no tags. git_describe was just HEX. 0+untagged.DISTANCE.gHEX[.dirty] - """ - if pieces["closest-tag"]: - rendered = pieces["closest-tag"] - if pieces["distance"] or pieces["dirty"]: - rendered += plus_or_dot(pieces) - rendered += "%d.g%s" % (pieces["distance"], pieces["short"]) - if pieces["dirty"]: - rendered += ".dirty" - else: - # exception #1 - rendered = "0+untagged.%d.g%s" % (pieces["distance"], pieces["short"]) - if pieces["dirty"]: - rendered += ".dirty" - return rendered - - -def render_pep440_pre(pieces): - """TAG[.post.devDISTANCE] -- No -dirty. - - Exceptions: - 1: no tags. 0.post.devDISTANCE - """ - if pieces["closest-tag"]: - rendered = pieces["closest-tag"] - if pieces["distance"]: - rendered += ".post.dev%d" % pieces["distance"] - else: - # exception #1 - rendered = "0.post.dev%d" % pieces["distance"] - return rendered - - -def render_pep440_post(pieces): - """TAG[.postDISTANCE[.dev0]+gHEX] . - - The ".dev0" means dirty. Note that .dev0 sorts backwards - (a dirty tree will appear "older" than the corresponding clean one), - but you shouldn't be releasing software with -dirty anyways. - - Exceptions: - 1: no tags. 0.postDISTANCE[.dev0] - """ - if pieces["closest-tag"]: - rendered = pieces["closest-tag"] - if pieces["distance"] or pieces["dirty"]: - rendered += ".post%d" % pieces["distance"] - if pieces["dirty"]: - rendered += ".dev0" - rendered += plus_or_dot(pieces) - rendered += "g%s" % pieces["short"] - else: - # exception #1 - rendered = "0.post%d" % pieces["distance"] - if pieces["dirty"]: - rendered += ".dev0" - rendered += "+g%s" % pieces["short"] - return rendered - - -def render_pep440_old(pieces): - """TAG[.postDISTANCE[.dev0]] . - - The ".dev0" means dirty. - - Eexceptions: - 1: no tags. 0.postDISTANCE[.dev0] - """ - if pieces["closest-tag"]: - rendered = pieces["closest-tag"] - if pieces["distance"] or pieces["dirty"]: - rendered += ".post%d" % pieces["distance"] - if pieces["dirty"]: - rendered += ".dev0" - else: - # exception #1 - rendered = "0.post%d" % pieces["distance"] - if pieces["dirty"]: - rendered += ".dev0" - return rendered - - -def render_git_describe(pieces): - """TAG[-DISTANCE-gHEX][-dirty]. - - Like 'git describe --tags --dirty --always'. - - Exceptions: - 1: no tags. HEX[-dirty] (note: no 'g' prefix) - """ - if pieces["closest-tag"]: - rendered = pieces["closest-tag"] - if pieces["distance"]: - rendered += "-%d-g%s" % (pieces["distance"], pieces["short"]) - else: - # exception #1 - rendered = pieces["short"] - if pieces["dirty"]: - rendered += "-dirty" - return rendered - - -def render_git_describe_long(pieces): - """TAG-DISTANCE-gHEX[-dirty]. - - Like 'git describe --tags --dirty --always -long'. - The distance/hash is unconditional. - - Exceptions: - 1: no tags. HEX[-dirty] (note: no 'g' prefix) - """ - if pieces["closest-tag"]: - rendered = pieces["closest-tag"] - rendered += "-%d-g%s" % (pieces["distance"], pieces["short"]) - else: - # exception #1 - rendered = pieces["short"] - if pieces["dirty"]: - rendered += "-dirty" - return rendered - - -def render(pieces, style): - """Render the given version pieces into the requested style.""" - if pieces["error"]: - return { - "version": "unknown", - "full-revisionid": pieces.get("long"), - "dirty": None, - "error": pieces["error"], - "date": None, - } - - if not style or style == "default": - style = "pep440" # the default - - if style == "pep440": - rendered = render_pep440(pieces) - elif style == "pep440-pre": - rendered = render_pep440_pre(pieces) - elif style == "pep440-post": - rendered = render_pep440_post(pieces) - elif style == "pep440-old": - rendered = render_pep440_old(pieces) - elif style == "git-describe": - rendered = render_git_describe(pieces) - elif style == "git-describe-long": - rendered = render_git_describe_long(pieces) - else: - raise ValueError("unknown style '%s'" % style) - - return { - "version": rendered, - "full-revisionid": pieces["long"], - "dirty": pieces["dirty"], - "error": None, - "date": pieces.get("date"), - } - - -class VersioneerBadRootError(Exception): - """The project root directory is unknown or missing key files.""" - - -def get_versions(verbose=False): - """Get the project version from whatever source is available. - - Returns dict with two keys: 'version' and 'full'. - """ - if "versioneer" in sys.modules: - # see the discussion in cmdclass.py:get_cmdclass() - del sys.modules["versioneer"] - - root = get_root() - cfg = get_config_from_root(root) - - assert cfg.VCS is not None, "please set [versioneer]VCS= in setup.cfg" - handlers = HANDLERS.get(cfg.VCS) - assert handlers, "unrecognized VCS '%s'" % cfg.VCS - verbose = verbose or cfg.verbose - assert ( - cfg.versionfile_source is not None - ), "please set versioneer.versionfile_source" - assert cfg.tag_prefix is not None, "please set versioneer.tag_prefix" - - versionfile_abs = os.path.join(root, cfg.versionfile_source) - - # extract version from first of: _version.py, VCS command (e.g. 'git - # describe'), parentdir. This is meant to work for developers using a - # source checkout, for users of a tarball created by 'setup.py sdist', - # and for users of a tarball/zipball created by 'git archive' or github's - # download-from-tag feature or the equivalent in other VCSes. - - get_keywords_f = handlers.get("get_keywords") - from_keywords_f = handlers.get("keywords") - if get_keywords_f and from_keywords_f: - try: - keywords = get_keywords_f(versionfile_abs) - ver = from_keywords_f(keywords, cfg.tag_prefix, verbose) - if verbose: - print("got version from expanded keyword %s" % ver) - return ver - except NotThisMethod: - pass - - try: - ver = versions_from_file(versionfile_abs) - if verbose: - print("got version from file %s %s" % (versionfile_abs, ver)) - return ver - except NotThisMethod: - pass - - from_vcs_f = handlers.get("pieces_from_vcs") - if from_vcs_f: - try: - pieces = from_vcs_f(cfg.tag_prefix, root, verbose) - ver = render(pieces, cfg.style) - if verbose: - print("got version from VCS %s" % ver) - return ver - except NotThisMethod: - pass - - try: - if cfg.parentdir_prefix: - ver = versions_from_parentdir(cfg.parentdir_prefix, root, verbose) - if verbose: - print("got version from parentdir %s" % ver) - return ver - except NotThisMethod: - pass - - if verbose: - print("unable to compute version") - - return { - "version": "0+unknown", - "full-revisionid": None, - "dirty": None, - "error": "unable to compute version", - "date": None, - } - - -def get_version(): - """Get the short version string for this project.""" - return get_versions()["version"] - - -def get_cmdclass(): - """Get the custom setuptools/distutils subclasses used by Versioneer.""" - if "versioneer" in sys.modules: - del sys.modules["versioneer"] - # this fixes the "python setup.py develop" case (also 'install' and - # 'easy_install .'), in which subdependencies of the main project are - # built (using setup.py bdist_egg) in the same python process. Assume - # a main project A and a dependency B, which use different versions - # of Versioneer. A's setup.py imports A's Versioneer, leaving it in - # sys.modules by the time B's setup.py is executed, causing B to run - # with the wrong versioneer. Setuptools wraps the sub-dep builds in a - # sandbox that restores sys.modules to it's pre-build state, so the - # parent is protected against the child's "import versioneer". By - # removing ourselves from sys.modules here, before the child build - # happens, we protect the child from the parent's versioneer too. - # Also see https://github.com/warner/python-versioneer/issues/52 - - cmds = {} - - # we add "version" to both distutils and setuptools - from distutils.core import Command - - class cmd_version(Command): - description = "report generated version string" - user_options = [] - boolean_options = [] - - def initialize_options(self): - pass - - def finalize_options(self): - pass - - def run(self): - vers = get_versions(verbose=True) - print("Version: %s" % vers["version"]) - print(" full-revisionid: %s" % vers.get("full-revisionid")) - print(" dirty: %s" % vers.get("dirty")) - print(" date: %s" % vers.get("date")) - if vers["error"]: - print(" error: %s" % vers["error"]) - - cmds["version"] = cmd_version - - # we override "build_py" in both distutils and setuptools - # - # most invocation pathways end up running build_py: - # distutils/build -> build_py - # distutils/install -> distutils/build ->.. - # setuptools/bdist_wheel -> distutils/install ->.. - # setuptools/bdist_egg -> distutils/install_lib -> build_py - # setuptools/install -> bdist_egg ->.. - # setuptools/develop -> ? - # pip install: - # copies source tree to a tempdir before running egg_info/etc - # if .git isn't copied too, 'git describe' will fail - # then does setup.py bdist_wheel, or sometimes setup.py install - # setup.py egg_info -> ? - - # we override different "build_py" commands for both environments - if "setuptools" in sys.modules: - from setuptools.command.build_py import build_py as _build_py - else: - from distutils.command.build_py import build_py as _build_py - - class cmd_build_py(_build_py): - def run(self): - root = get_root() - cfg = get_config_from_root(root) - versions = get_versions() - _build_py.run(self) - # now locate _version.py in the new build/ directory and replace - # it with an updated value - if cfg.versionfile_build: - target_versionfile = os.path.join( - self.build_lib, cfg.versionfile_build - ) - print("UPDATING %s" % target_versionfile) - write_to_version_file(target_versionfile, versions) - - cmds["build_py"] = cmd_build_py - - if "cx_Freeze" in sys.modules: # cx_freeze enabled? - from cx_Freeze.dist import build_exe as _build_exe - - # nczeczulin reports that py2exe won't like the pep440-style string - # as FILEVERSION, but it can be used for PRODUCTVERSION, e.g. - # setup(console=[{ - # "version": versioneer.get_version().split("+", 1)[0], # FILEVERSION - # "product_version": versioneer.get_version(), - # ... - - class cmd_build_exe(_build_exe): - def run(self): - root = get_root() - cfg = get_config_from_root(root) - versions = get_versions() - target_versionfile = cfg.versionfile_source - print("UPDATING %s" % target_versionfile) - write_to_version_file(target_versionfile, versions) - - _build_exe.run(self) - os.unlink(target_versionfile) - with open(cfg.versionfile_source, "w") as f: - LONG = LONG_VERSION_PY[cfg.VCS] - f.write( - LONG - % { - "DOLLAR": "$", - "STYLE": cfg.style, - "TAG_PREFIX": cfg.tag_prefix, - "PARENTDIR_PREFIX": cfg.parentdir_prefix, - "VERSIONFILE_SOURCE": cfg.versionfile_source, - } - ) - - cmds["build_exe"] = cmd_build_exe - del cmds["build_py"] - - if "py2exe" in sys.modules: # py2exe enabled? - try: - from py2exe.distutils_buildexe import py2exe as _py2exe # py3 - except ImportError: - from py2exe.build_exe import py2exe as _py2exe # py2 - - class cmd_py2exe(_py2exe): - def run(self): - root = get_root() - cfg = get_config_from_root(root) - versions = get_versions() - target_versionfile = cfg.versionfile_source - print("UPDATING %s" % target_versionfile) - write_to_version_file(target_versionfile, versions) - - _py2exe.run(self) - os.unlink(target_versionfile) - with open(cfg.versionfile_source, "w") as f: - LONG = LONG_VERSION_PY[cfg.VCS] - f.write( - LONG - % { - "DOLLAR": "$", - "STYLE": cfg.style, - "TAG_PREFIX": cfg.tag_prefix, - "PARENTDIR_PREFIX": cfg.parentdir_prefix, - "VERSIONFILE_SOURCE": cfg.versionfile_source, - } - ) - - cmds["py2exe"] = cmd_py2exe - - # we override different "sdist" commands for both environments - if "setuptools" in sys.modules: - from setuptools.command.sdist import sdist as _sdist - else: - from distutils.command.sdist import sdist as _sdist - - class cmd_sdist(_sdist): - def run(self): - versions = get_versions() - self._versioneer_generated_versions = versions - # unless we update this, the command will keep using the old - # version - self.distribution.metadata.version = versions["version"] - return _sdist.run(self) - - def make_release_tree(self, base_dir, files): - root = get_root() - cfg = get_config_from_root(root) - _sdist.make_release_tree(self, base_dir, files) - # now locate _version.py in the new base_dir directory - # (remembering that it may be a hardlink) and replace it with an - # updated value - target_versionfile = os.path.join(base_dir, cfg.versionfile_source) - print("UPDATING %s" % target_versionfile) - write_to_version_file( - target_versionfile, self._versioneer_generated_versions - ) - - cmds["sdist"] = cmd_sdist - - return cmds - - -CONFIG_ERROR = """ -setup.cfg is missing the necessary Versioneer configuration. You need -a section like: - - [versioneer] - VCS = git - style = pep440 - versionfile_source = src/myproject/_version.py - versionfile_build = myproject/_version.py - tag_prefix = - parentdir_prefix = myproject- - -You will also need to edit your setup.py to use the results: - - import versioneer - setup(version=versioneer.get_version(), - cmdclass=versioneer.get_cmdclass(), ...) - -Please read the docstring in ./versioneer.py for configuration instructions, -edit setup.cfg, and re-run the installer or 'python versioneer.py setup'. -""" - -SAMPLE_CONFIG = """ -# See the docstring in versioneer.py for instructions. Note that you must -# re-run 'versioneer.py setup' after changing this section, and commit the -# resulting files. - -[versioneer] -#VCS = git -#style = pep440 -#versionfile_source = -#versionfile_build = -#tag_prefix = -#parentdir_prefix = - -""" - -INIT_PY_SNIPPET = """ -from ._version import get_versions -__version__ = get_versions()['version'] -del get_versions -""" - - -def do_setup(): - """Main VCS-independent setup function for installing Versioneer.""" - root = get_root() - try: - cfg = get_config_from_root(root) - except ( - EnvironmentError, - configparser.NoSectionError, - configparser.NoOptionError, - ) as e: - if isinstance(e, (EnvironmentError, configparser.NoSectionError)): - print( - "Adding sample versioneer config to setup.cfg", file=sys.stderr - ) - with open(os.path.join(root, "setup.cfg"), "a") as f: - f.write(SAMPLE_CONFIG) - print(CONFIG_ERROR, file=sys.stderr) - return 1 - - print(" creating %s" % cfg.versionfile_source) - with open(cfg.versionfile_source, "w") as f: - LONG = LONG_VERSION_PY[cfg.VCS] - f.write( - LONG - % { - "DOLLAR": "$", - "STYLE": cfg.style, - "TAG_PREFIX": cfg.tag_prefix, - "PARENTDIR_PREFIX": cfg.parentdir_prefix, - "VERSIONFILE_SOURCE": cfg.versionfile_source, - } - ) - - ipy = os.path.join(os.path.dirname(cfg.versionfile_source), "__init__.py") - if os.path.exists(ipy): - try: - with open(ipy, "r") as f: - old = f.read() - except EnvironmentError: - old = "" - if INIT_PY_SNIPPET not in old: - print(" appending to %s" % ipy) - with open(ipy, "a") as f: - f.write(INIT_PY_SNIPPET) - else: - print(" %s unmodified" % ipy) - else: - print(" %s doesn't exist, ok" % ipy) - ipy = None - - # Make sure both the top-level "versioneer.py" and versionfile_source - # (PKG/_version.py, used by runtime code) are in MANIFEST.in, so - # they'll be copied into source distributions. Pip won't be able to - # install the package without this. - manifest_in = os.path.join(root, "MANIFEST.in") - simple_includes = set() - try: - with open(manifest_in, "r") as f: - for line in f: - if line.startswith("include "): - for include in line.split()[1:]: - simple_includes.add(include) - except EnvironmentError: - pass - # That doesn't cover everything MANIFEST.in can do - # (http://docs.python.org/2/distutils/sourcedist.html#commands), so - # it might give some false negatives. Appending redundant 'include' - # lines is safe, though. - if "versioneer.py" not in simple_includes: - print(" appending 'versioneer.py' to MANIFEST.in") - with open(manifest_in, "a") as f: - f.write("include versioneer.py\n") - else: - print(" 'versioneer.py' already in MANIFEST.in") - if cfg.versionfile_source not in simple_includes: - print( - " appending versionfile_source ('%s') to MANIFEST.in" - % cfg.versionfile_source - ) - with open(manifest_in, "a") as f: - f.write("include %s\n" % cfg.versionfile_source) - else: - print(" versionfile_source already in MANIFEST.in") - - # Make VCS-specific changes. For git, this means creating/changing - # .gitattributes to mark _version.py for export-subst keyword - # substitution. - do_vcs_install(manifest_in, cfg.versionfile_source, ipy) - return 0 - - -def scan_setup_py(): - """Validate the contents of setup.py against Versioneer's expectations.""" - found = set() - setters = False - errors = 0 - with open("setup.py", "r") as f: - for line in f.readlines(): - if "import versioneer" in line: - found.add("import") - if "versioneer.get_cmdclass()" in line: - found.add("cmdclass") - if "versioneer.get_version()" in line: - found.add("get_version") - if "versioneer.VCS" in line: - setters = True - if "versioneer.versionfile_source" in line: - setters = True - if len(found) != 3: - print("") - print("Your setup.py appears to be missing some important items") - print("(but I might be wrong). Please make sure it has something") - print("roughly like the following:") - print("") - print(" import versioneer") - print(" setup( version=versioneer.get_version(),") - print(" cmdclass=versioneer.get_cmdclass(), ...)") - print("") - errors += 1 - if setters: - print("You should remove lines like 'versioneer.VCS = ' and") - print("'versioneer.versionfile_source = ' . This configuration") - print("now lives in setup.cfg, and should be removed from setup.py") - print("") - errors += 1 - return errors - - -if __name__ == "__main__": - cmd = sys.argv[1] - if cmd == "setup": - errors = do_setup() - errors += scan_setup_py() - if errors: - sys.exit(1) From 31deb1f38ed3e68ffa18e004ce34ceb9a5054c62 Mon Sep 17 00:00:00 2001 From: Chris Lunsford Date: Thu, 20 Jun 2024 00:35:09 -0400 Subject: [PATCH 02/22] Move package files --- pyproject.toml | 2 +- {webexteamssdk => src/webexpythonsdk}/__init__.py | 0 {webexteamssdk => src/webexpythonsdk}/_metadata.py | 0 {webexteamssdk => src/webexpythonsdk}/_version.py | 0 {webexteamssdk => src/webexpythonsdk}/api/__init__.py | 0 {webexteamssdk => src/webexpythonsdk}/api/access_tokens.py | 0 {webexteamssdk => src/webexpythonsdk}/api/admin_audit_events.py | 0 {webexteamssdk => src/webexpythonsdk}/api/attachment_actions.py | 0 {webexteamssdk => src/webexpythonsdk}/api/events.py | 0 {webexteamssdk => src/webexpythonsdk}/api/guest_issuer.py | 0 {webexteamssdk => src/webexpythonsdk}/api/licenses.py | 0 {webexteamssdk => src/webexpythonsdk}/api/meeting_invitees.py | 0 .../webexpythonsdk}/api/meeting_registrants.py | 0 {webexteamssdk => src/webexpythonsdk}/api/meeting_templates.py | 0 {webexteamssdk => src/webexpythonsdk}/api/meetings.py | 0 {webexteamssdk => src/webexpythonsdk}/api/memberships.py | 0 {webexteamssdk => src/webexpythonsdk}/api/messages.py | 0 {webexteamssdk => src/webexpythonsdk}/api/organizations.py | 0 {webexteamssdk => src/webexpythonsdk}/api/people.py | 0 {webexteamssdk => src/webexpythonsdk}/api/recordings.py | 0 {webexteamssdk => src/webexpythonsdk}/api/roles.py | 0 {webexteamssdk => src/webexpythonsdk}/api/room_tabs.py | 0 {webexteamssdk => src/webexpythonsdk}/api/rooms.py | 0 {webexteamssdk => src/webexpythonsdk}/api/team_memberships.py | 0 {webexteamssdk => src/webexpythonsdk}/api/teams.py | 0 {webexteamssdk => src/webexpythonsdk}/api/webhooks.py | 0 {webexteamssdk => src/webexpythonsdk}/config.py | 0 {webexteamssdk => src/webexpythonsdk}/environment.py | 0 {webexteamssdk => src/webexpythonsdk}/exceptions.py | 0 {webexteamssdk => src/webexpythonsdk}/generator_containers.py | 0 {webexteamssdk => src/webexpythonsdk}/models/__init__.py | 0 {webexteamssdk => src/webexpythonsdk}/models/cards/__init__.py | 0 {webexteamssdk => src/webexpythonsdk}/models/cards/actions.py | 0 .../webexpythonsdk}/models/cards/adaptive_card_component.py | 0 {webexteamssdk => src/webexpythonsdk}/models/cards/card.py | 0 .../webexpythonsdk}/models/cards/components.py | 0 {webexteamssdk => src/webexpythonsdk}/models/cards/container.py | 0 {webexteamssdk => src/webexpythonsdk}/models/cards/inputs.py | 0 {webexteamssdk => src/webexpythonsdk}/models/cards/options.py | 0 {webexteamssdk => src/webexpythonsdk}/models/cards/utils.py | 0 {webexteamssdk => src/webexpythonsdk}/models/dictionary.py | 0 {webexteamssdk => src/webexpythonsdk}/models/immutable.py | 0 {webexteamssdk => src/webexpythonsdk}/models/mixins/__init__.py | 0 .../webexpythonsdk}/models/mixins/access_token.py | 0 .../webexpythonsdk}/models/mixins/admin_audit_event.py | 0 .../webexpythonsdk}/models/mixins/attachment_action.py | 0 {webexteamssdk => src/webexpythonsdk}/models/mixins/event.py | 0 .../webexpythonsdk}/models/mixins/guest_issuer_token.py | 0 {webexteamssdk => src/webexpythonsdk}/models/mixins/license.py | 0 .../webexpythonsdk}/models/mixins/meeting_invitees.py | 0 .../webexpythonsdk}/models/mixins/meeting_registrants.py | 0 .../webexpythonsdk}/models/mixins/meeting_templates.py | 0 {webexteamssdk => src/webexpythonsdk}/models/mixins/meetings.py | 0 .../webexpythonsdk}/models/mixins/membership.py | 0 {webexteamssdk => src/webexpythonsdk}/models/mixins/message.py | 0 .../webexpythonsdk}/models/mixins/organization.py | 0 {webexteamssdk => src/webexpythonsdk}/models/mixins/person.py | 0 .../webexpythonsdk}/models/mixins/recording.py | 0 {webexteamssdk => src/webexpythonsdk}/models/mixins/role.py | 0 {webexteamssdk => src/webexpythonsdk}/models/mixins/room.py | 0 .../webexpythonsdk}/models/mixins/room_meeting_info.py | 0 {webexteamssdk => src/webexpythonsdk}/models/mixins/room_tab.py | 0 {webexteamssdk => src/webexpythonsdk}/models/mixins/team.py | 0 .../webexpythonsdk}/models/mixins/team_membership.py | 0 {webexteamssdk => src/webexpythonsdk}/models/mixins/webhook.py | 0 .../webexpythonsdk}/models/mixins/webhook_event.py | 0 {webexteamssdk => src/webexpythonsdk}/models/simple.py | 0 {webexteamssdk => src/webexpythonsdk}/response_codes.py | 0 {webexteamssdk => src/webexpythonsdk}/restsession.py | 0 {webexteamssdk => src/webexpythonsdk}/utils.py | 0 70 files changed, 1 insertion(+), 1 deletion(-) rename {webexteamssdk => src/webexpythonsdk}/__init__.py (100%) rename {webexteamssdk => src/webexpythonsdk}/_metadata.py (100%) rename {webexteamssdk => src/webexpythonsdk}/_version.py (100%) rename {webexteamssdk => src/webexpythonsdk}/api/__init__.py (100%) rename {webexteamssdk => src/webexpythonsdk}/api/access_tokens.py (100%) rename {webexteamssdk => src/webexpythonsdk}/api/admin_audit_events.py (100%) rename {webexteamssdk => src/webexpythonsdk}/api/attachment_actions.py (100%) rename {webexteamssdk => src/webexpythonsdk}/api/events.py (100%) rename {webexteamssdk => src/webexpythonsdk}/api/guest_issuer.py (100%) rename {webexteamssdk => src/webexpythonsdk}/api/licenses.py (100%) rename {webexteamssdk => src/webexpythonsdk}/api/meeting_invitees.py (100%) rename {webexteamssdk => src/webexpythonsdk}/api/meeting_registrants.py (100%) rename {webexteamssdk => src/webexpythonsdk}/api/meeting_templates.py (100%) rename {webexteamssdk => src/webexpythonsdk}/api/meetings.py (100%) rename {webexteamssdk => src/webexpythonsdk}/api/memberships.py (100%) rename {webexteamssdk => src/webexpythonsdk}/api/messages.py (100%) rename {webexteamssdk => src/webexpythonsdk}/api/organizations.py (100%) rename {webexteamssdk => src/webexpythonsdk}/api/people.py (100%) rename {webexteamssdk => src/webexpythonsdk}/api/recordings.py (100%) rename {webexteamssdk => src/webexpythonsdk}/api/roles.py (100%) rename {webexteamssdk => src/webexpythonsdk}/api/room_tabs.py (100%) rename {webexteamssdk => src/webexpythonsdk}/api/rooms.py (100%) rename {webexteamssdk => src/webexpythonsdk}/api/team_memberships.py (100%) rename {webexteamssdk => src/webexpythonsdk}/api/teams.py (100%) rename {webexteamssdk => src/webexpythonsdk}/api/webhooks.py (100%) rename {webexteamssdk => src/webexpythonsdk}/config.py (100%) rename {webexteamssdk => src/webexpythonsdk}/environment.py (100%) rename {webexteamssdk => src/webexpythonsdk}/exceptions.py (100%) rename {webexteamssdk => src/webexpythonsdk}/generator_containers.py (100%) rename {webexteamssdk => src/webexpythonsdk}/models/__init__.py (100%) rename {webexteamssdk => src/webexpythonsdk}/models/cards/__init__.py (100%) rename {webexteamssdk => src/webexpythonsdk}/models/cards/actions.py (100%) rename {webexteamssdk => src/webexpythonsdk}/models/cards/adaptive_card_component.py (100%) rename {webexteamssdk => src/webexpythonsdk}/models/cards/card.py (100%) rename {webexteamssdk => src/webexpythonsdk}/models/cards/components.py (100%) rename {webexteamssdk => src/webexpythonsdk}/models/cards/container.py (100%) rename {webexteamssdk => src/webexpythonsdk}/models/cards/inputs.py (100%) rename {webexteamssdk => src/webexpythonsdk}/models/cards/options.py (100%) rename {webexteamssdk => src/webexpythonsdk}/models/cards/utils.py (100%) rename {webexteamssdk => src/webexpythonsdk}/models/dictionary.py (100%) rename {webexteamssdk => src/webexpythonsdk}/models/immutable.py (100%) rename {webexteamssdk => src/webexpythonsdk}/models/mixins/__init__.py (100%) rename {webexteamssdk => src/webexpythonsdk}/models/mixins/access_token.py (100%) rename {webexteamssdk => src/webexpythonsdk}/models/mixins/admin_audit_event.py (100%) rename {webexteamssdk => src/webexpythonsdk}/models/mixins/attachment_action.py (100%) rename {webexteamssdk => src/webexpythonsdk}/models/mixins/event.py (100%) rename {webexteamssdk => src/webexpythonsdk}/models/mixins/guest_issuer_token.py (100%) rename {webexteamssdk => src/webexpythonsdk}/models/mixins/license.py (100%) rename {webexteamssdk => src/webexpythonsdk}/models/mixins/meeting_invitees.py (100%) rename {webexteamssdk => src/webexpythonsdk}/models/mixins/meeting_registrants.py (100%) rename {webexteamssdk => src/webexpythonsdk}/models/mixins/meeting_templates.py (100%) rename {webexteamssdk => src/webexpythonsdk}/models/mixins/meetings.py (100%) rename {webexteamssdk => src/webexpythonsdk}/models/mixins/membership.py (100%) rename {webexteamssdk => src/webexpythonsdk}/models/mixins/message.py (100%) rename {webexteamssdk => src/webexpythonsdk}/models/mixins/organization.py (100%) rename {webexteamssdk => src/webexpythonsdk}/models/mixins/person.py (100%) rename {webexteamssdk => src/webexpythonsdk}/models/mixins/recording.py (100%) rename {webexteamssdk => src/webexpythonsdk}/models/mixins/role.py (100%) rename {webexteamssdk => src/webexpythonsdk}/models/mixins/room.py (100%) rename {webexteamssdk => src/webexpythonsdk}/models/mixins/room_meeting_info.py (100%) rename {webexteamssdk => src/webexpythonsdk}/models/mixins/room_tab.py (100%) rename {webexteamssdk => src/webexpythonsdk}/models/mixins/team.py (100%) rename {webexteamssdk => src/webexpythonsdk}/models/mixins/team_membership.py (100%) rename {webexteamssdk => src/webexpythonsdk}/models/mixins/webhook.py (100%) rename {webexteamssdk => src/webexpythonsdk}/models/mixins/webhook_event.py (100%) rename {webexteamssdk => src/webexpythonsdk}/models/simple.py (100%) rename {webexteamssdk => src/webexpythonsdk}/response_codes.py (100%) rename {webexteamssdk => src/webexpythonsdk}/restsession.py (100%) rename {webexteamssdk => src/webexpythonsdk}/utils.py (100%) diff --git a/pyproject.toml b/pyproject.toml index 20f9e7a..f7f2fec 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,5 +1,5 @@ [tool.poetry] -name = "WebexPythonSDK" +name = "webexpythonsdk" version = "0.0.0" description = "Work with the Webex APIs in native Python!" authors = ["Chris Lunsford "] diff --git a/webexteamssdk/__init__.py b/src/webexpythonsdk/__init__.py similarity index 100% rename from webexteamssdk/__init__.py rename to src/webexpythonsdk/__init__.py diff --git a/webexteamssdk/_metadata.py b/src/webexpythonsdk/_metadata.py similarity index 100% rename from webexteamssdk/_metadata.py rename to src/webexpythonsdk/_metadata.py diff --git a/webexteamssdk/_version.py b/src/webexpythonsdk/_version.py similarity index 100% rename from webexteamssdk/_version.py rename to src/webexpythonsdk/_version.py diff --git a/webexteamssdk/api/__init__.py b/src/webexpythonsdk/api/__init__.py similarity index 100% rename from webexteamssdk/api/__init__.py rename to src/webexpythonsdk/api/__init__.py diff --git a/webexteamssdk/api/access_tokens.py b/src/webexpythonsdk/api/access_tokens.py similarity index 100% rename from webexteamssdk/api/access_tokens.py rename to src/webexpythonsdk/api/access_tokens.py diff --git a/webexteamssdk/api/admin_audit_events.py b/src/webexpythonsdk/api/admin_audit_events.py similarity index 100% rename from webexteamssdk/api/admin_audit_events.py rename to src/webexpythonsdk/api/admin_audit_events.py diff --git a/webexteamssdk/api/attachment_actions.py b/src/webexpythonsdk/api/attachment_actions.py similarity index 100% rename from webexteamssdk/api/attachment_actions.py rename to src/webexpythonsdk/api/attachment_actions.py diff --git a/webexteamssdk/api/events.py b/src/webexpythonsdk/api/events.py similarity index 100% rename from webexteamssdk/api/events.py rename to src/webexpythonsdk/api/events.py diff --git a/webexteamssdk/api/guest_issuer.py b/src/webexpythonsdk/api/guest_issuer.py similarity index 100% rename from webexteamssdk/api/guest_issuer.py rename to src/webexpythonsdk/api/guest_issuer.py diff --git a/webexteamssdk/api/licenses.py b/src/webexpythonsdk/api/licenses.py similarity index 100% rename from webexteamssdk/api/licenses.py rename to src/webexpythonsdk/api/licenses.py diff --git a/webexteamssdk/api/meeting_invitees.py b/src/webexpythonsdk/api/meeting_invitees.py similarity index 100% rename from webexteamssdk/api/meeting_invitees.py rename to src/webexpythonsdk/api/meeting_invitees.py diff --git a/webexteamssdk/api/meeting_registrants.py b/src/webexpythonsdk/api/meeting_registrants.py similarity index 100% rename from webexteamssdk/api/meeting_registrants.py rename to src/webexpythonsdk/api/meeting_registrants.py diff --git a/webexteamssdk/api/meeting_templates.py b/src/webexpythonsdk/api/meeting_templates.py similarity index 100% rename from webexteamssdk/api/meeting_templates.py rename to src/webexpythonsdk/api/meeting_templates.py diff --git a/webexteamssdk/api/meetings.py b/src/webexpythonsdk/api/meetings.py similarity index 100% rename from webexteamssdk/api/meetings.py rename to src/webexpythonsdk/api/meetings.py diff --git a/webexteamssdk/api/memberships.py b/src/webexpythonsdk/api/memberships.py similarity index 100% rename from webexteamssdk/api/memberships.py rename to src/webexpythonsdk/api/memberships.py diff --git a/webexteamssdk/api/messages.py b/src/webexpythonsdk/api/messages.py similarity index 100% rename from webexteamssdk/api/messages.py rename to src/webexpythonsdk/api/messages.py diff --git a/webexteamssdk/api/organizations.py b/src/webexpythonsdk/api/organizations.py similarity index 100% rename from webexteamssdk/api/organizations.py rename to src/webexpythonsdk/api/organizations.py diff --git a/webexteamssdk/api/people.py b/src/webexpythonsdk/api/people.py similarity index 100% rename from webexteamssdk/api/people.py rename to src/webexpythonsdk/api/people.py diff --git a/webexteamssdk/api/recordings.py b/src/webexpythonsdk/api/recordings.py similarity index 100% rename from webexteamssdk/api/recordings.py rename to src/webexpythonsdk/api/recordings.py diff --git a/webexteamssdk/api/roles.py b/src/webexpythonsdk/api/roles.py similarity index 100% rename from webexteamssdk/api/roles.py rename to src/webexpythonsdk/api/roles.py diff --git a/webexteamssdk/api/room_tabs.py b/src/webexpythonsdk/api/room_tabs.py similarity index 100% rename from webexteamssdk/api/room_tabs.py rename to src/webexpythonsdk/api/room_tabs.py diff --git a/webexteamssdk/api/rooms.py b/src/webexpythonsdk/api/rooms.py similarity index 100% rename from webexteamssdk/api/rooms.py rename to src/webexpythonsdk/api/rooms.py diff --git a/webexteamssdk/api/team_memberships.py b/src/webexpythonsdk/api/team_memberships.py similarity index 100% rename from webexteamssdk/api/team_memberships.py rename to src/webexpythonsdk/api/team_memberships.py diff --git a/webexteamssdk/api/teams.py b/src/webexpythonsdk/api/teams.py similarity index 100% rename from webexteamssdk/api/teams.py rename to src/webexpythonsdk/api/teams.py diff --git a/webexteamssdk/api/webhooks.py b/src/webexpythonsdk/api/webhooks.py similarity index 100% rename from webexteamssdk/api/webhooks.py rename to src/webexpythonsdk/api/webhooks.py diff --git a/webexteamssdk/config.py b/src/webexpythonsdk/config.py similarity index 100% rename from webexteamssdk/config.py rename to src/webexpythonsdk/config.py diff --git a/webexteamssdk/environment.py b/src/webexpythonsdk/environment.py similarity index 100% rename from webexteamssdk/environment.py rename to src/webexpythonsdk/environment.py diff --git a/webexteamssdk/exceptions.py b/src/webexpythonsdk/exceptions.py similarity index 100% rename from webexteamssdk/exceptions.py rename to src/webexpythonsdk/exceptions.py diff --git a/webexteamssdk/generator_containers.py b/src/webexpythonsdk/generator_containers.py similarity index 100% rename from webexteamssdk/generator_containers.py rename to src/webexpythonsdk/generator_containers.py diff --git a/webexteamssdk/models/__init__.py b/src/webexpythonsdk/models/__init__.py similarity index 100% rename from webexteamssdk/models/__init__.py rename to src/webexpythonsdk/models/__init__.py diff --git a/webexteamssdk/models/cards/__init__.py b/src/webexpythonsdk/models/cards/__init__.py similarity index 100% rename from webexteamssdk/models/cards/__init__.py rename to src/webexpythonsdk/models/cards/__init__.py diff --git a/webexteamssdk/models/cards/actions.py b/src/webexpythonsdk/models/cards/actions.py similarity index 100% rename from webexteamssdk/models/cards/actions.py rename to src/webexpythonsdk/models/cards/actions.py diff --git a/webexteamssdk/models/cards/adaptive_card_component.py b/src/webexpythonsdk/models/cards/adaptive_card_component.py similarity index 100% rename from webexteamssdk/models/cards/adaptive_card_component.py rename to src/webexpythonsdk/models/cards/adaptive_card_component.py diff --git a/webexteamssdk/models/cards/card.py b/src/webexpythonsdk/models/cards/card.py similarity index 100% rename from webexteamssdk/models/cards/card.py rename to src/webexpythonsdk/models/cards/card.py diff --git a/webexteamssdk/models/cards/components.py b/src/webexpythonsdk/models/cards/components.py similarity index 100% rename from webexteamssdk/models/cards/components.py rename to src/webexpythonsdk/models/cards/components.py diff --git a/webexteamssdk/models/cards/container.py b/src/webexpythonsdk/models/cards/container.py similarity index 100% rename from webexteamssdk/models/cards/container.py rename to src/webexpythonsdk/models/cards/container.py diff --git a/webexteamssdk/models/cards/inputs.py b/src/webexpythonsdk/models/cards/inputs.py similarity index 100% rename from webexteamssdk/models/cards/inputs.py rename to src/webexpythonsdk/models/cards/inputs.py diff --git a/webexteamssdk/models/cards/options.py b/src/webexpythonsdk/models/cards/options.py similarity index 100% rename from webexteamssdk/models/cards/options.py rename to src/webexpythonsdk/models/cards/options.py diff --git a/webexteamssdk/models/cards/utils.py b/src/webexpythonsdk/models/cards/utils.py similarity index 100% rename from webexteamssdk/models/cards/utils.py rename to src/webexpythonsdk/models/cards/utils.py diff --git a/webexteamssdk/models/dictionary.py b/src/webexpythonsdk/models/dictionary.py similarity index 100% rename from webexteamssdk/models/dictionary.py rename to src/webexpythonsdk/models/dictionary.py diff --git a/webexteamssdk/models/immutable.py b/src/webexpythonsdk/models/immutable.py similarity index 100% rename from webexteamssdk/models/immutable.py rename to src/webexpythonsdk/models/immutable.py diff --git a/webexteamssdk/models/mixins/__init__.py b/src/webexpythonsdk/models/mixins/__init__.py similarity index 100% rename from webexteamssdk/models/mixins/__init__.py rename to src/webexpythonsdk/models/mixins/__init__.py diff --git a/webexteamssdk/models/mixins/access_token.py b/src/webexpythonsdk/models/mixins/access_token.py similarity index 100% rename from webexteamssdk/models/mixins/access_token.py rename to src/webexpythonsdk/models/mixins/access_token.py diff --git a/webexteamssdk/models/mixins/admin_audit_event.py b/src/webexpythonsdk/models/mixins/admin_audit_event.py similarity index 100% rename from webexteamssdk/models/mixins/admin_audit_event.py rename to src/webexpythonsdk/models/mixins/admin_audit_event.py diff --git a/webexteamssdk/models/mixins/attachment_action.py b/src/webexpythonsdk/models/mixins/attachment_action.py similarity index 100% rename from webexteamssdk/models/mixins/attachment_action.py rename to src/webexpythonsdk/models/mixins/attachment_action.py diff --git a/webexteamssdk/models/mixins/event.py b/src/webexpythonsdk/models/mixins/event.py similarity index 100% rename from webexteamssdk/models/mixins/event.py rename to src/webexpythonsdk/models/mixins/event.py diff --git a/webexteamssdk/models/mixins/guest_issuer_token.py b/src/webexpythonsdk/models/mixins/guest_issuer_token.py similarity index 100% rename from webexteamssdk/models/mixins/guest_issuer_token.py rename to src/webexpythonsdk/models/mixins/guest_issuer_token.py diff --git a/webexteamssdk/models/mixins/license.py b/src/webexpythonsdk/models/mixins/license.py similarity index 100% rename from webexteamssdk/models/mixins/license.py rename to src/webexpythonsdk/models/mixins/license.py diff --git a/webexteamssdk/models/mixins/meeting_invitees.py b/src/webexpythonsdk/models/mixins/meeting_invitees.py similarity index 100% rename from webexteamssdk/models/mixins/meeting_invitees.py rename to src/webexpythonsdk/models/mixins/meeting_invitees.py diff --git a/webexteamssdk/models/mixins/meeting_registrants.py b/src/webexpythonsdk/models/mixins/meeting_registrants.py similarity index 100% rename from webexteamssdk/models/mixins/meeting_registrants.py rename to src/webexpythonsdk/models/mixins/meeting_registrants.py diff --git a/webexteamssdk/models/mixins/meeting_templates.py b/src/webexpythonsdk/models/mixins/meeting_templates.py similarity index 100% rename from webexteamssdk/models/mixins/meeting_templates.py rename to src/webexpythonsdk/models/mixins/meeting_templates.py diff --git a/webexteamssdk/models/mixins/meetings.py b/src/webexpythonsdk/models/mixins/meetings.py similarity index 100% rename from webexteamssdk/models/mixins/meetings.py rename to src/webexpythonsdk/models/mixins/meetings.py diff --git a/webexteamssdk/models/mixins/membership.py b/src/webexpythonsdk/models/mixins/membership.py similarity index 100% rename from webexteamssdk/models/mixins/membership.py rename to src/webexpythonsdk/models/mixins/membership.py diff --git a/webexteamssdk/models/mixins/message.py b/src/webexpythonsdk/models/mixins/message.py similarity index 100% rename from webexteamssdk/models/mixins/message.py rename to src/webexpythonsdk/models/mixins/message.py diff --git a/webexteamssdk/models/mixins/organization.py b/src/webexpythonsdk/models/mixins/organization.py similarity index 100% rename from webexteamssdk/models/mixins/organization.py rename to src/webexpythonsdk/models/mixins/organization.py diff --git a/webexteamssdk/models/mixins/person.py b/src/webexpythonsdk/models/mixins/person.py similarity index 100% rename from webexteamssdk/models/mixins/person.py rename to src/webexpythonsdk/models/mixins/person.py diff --git a/webexteamssdk/models/mixins/recording.py b/src/webexpythonsdk/models/mixins/recording.py similarity index 100% rename from webexteamssdk/models/mixins/recording.py rename to src/webexpythonsdk/models/mixins/recording.py diff --git a/webexteamssdk/models/mixins/role.py b/src/webexpythonsdk/models/mixins/role.py similarity index 100% rename from webexteamssdk/models/mixins/role.py rename to src/webexpythonsdk/models/mixins/role.py diff --git a/webexteamssdk/models/mixins/room.py b/src/webexpythonsdk/models/mixins/room.py similarity index 100% rename from webexteamssdk/models/mixins/room.py rename to src/webexpythonsdk/models/mixins/room.py diff --git a/webexteamssdk/models/mixins/room_meeting_info.py b/src/webexpythonsdk/models/mixins/room_meeting_info.py similarity index 100% rename from webexteamssdk/models/mixins/room_meeting_info.py rename to src/webexpythonsdk/models/mixins/room_meeting_info.py diff --git a/webexteamssdk/models/mixins/room_tab.py b/src/webexpythonsdk/models/mixins/room_tab.py similarity index 100% rename from webexteamssdk/models/mixins/room_tab.py rename to src/webexpythonsdk/models/mixins/room_tab.py diff --git a/webexteamssdk/models/mixins/team.py b/src/webexpythonsdk/models/mixins/team.py similarity index 100% rename from webexteamssdk/models/mixins/team.py rename to src/webexpythonsdk/models/mixins/team.py diff --git a/webexteamssdk/models/mixins/team_membership.py b/src/webexpythonsdk/models/mixins/team_membership.py similarity index 100% rename from webexteamssdk/models/mixins/team_membership.py rename to src/webexpythonsdk/models/mixins/team_membership.py diff --git a/webexteamssdk/models/mixins/webhook.py b/src/webexpythonsdk/models/mixins/webhook.py similarity index 100% rename from webexteamssdk/models/mixins/webhook.py rename to src/webexpythonsdk/models/mixins/webhook.py diff --git a/webexteamssdk/models/mixins/webhook_event.py b/src/webexpythonsdk/models/mixins/webhook_event.py similarity index 100% rename from webexteamssdk/models/mixins/webhook_event.py rename to src/webexpythonsdk/models/mixins/webhook_event.py diff --git a/webexteamssdk/models/simple.py b/src/webexpythonsdk/models/simple.py similarity index 100% rename from webexteamssdk/models/simple.py rename to src/webexpythonsdk/models/simple.py diff --git a/webexteamssdk/response_codes.py b/src/webexpythonsdk/response_codes.py similarity index 100% rename from webexteamssdk/response_codes.py rename to src/webexpythonsdk/response_codes.py diff --git a/webexteamssdk/restsession.py b/src/webexpythonsdk/restsession.py similarity index 100% rename from webexteamssdk/restsession.py rename to src/webexpythonsdk/restsession.py diff --git a/webexteamssdk/utils.py b/src/webexpythonsdk/utils.py similarity index 100% rename from webexteamssdk/utils.py rename to src/webexpythonsdk/utils.py From ac33298fff5447a1d97bdea3a76917b4e87fd720 Mon Sep 17 00:00:00 2001 From: Chris Lunsford Date: Thu, 20 Jun 2024 00:39:52 -0400 Subject: [PATCH 03/22] Remove .gitattributes file --- .gitattributes | 1 - 1 file changed, 1 deletion(-) delete mode 100644 .gitattributes diff --git a/.gitattributes b/.gitattributes deleted file mode 100644 index ec2ad78..0000000 --- a/.gitattributes +++ /dev/null @@ -1 +0,0 @@ -webexteamssdk/_version.py export-subst From cebaba133a3bed4883c3889da0ce625994a3aee3 Mon Sep 17 00:00:00 2001 From: Chris Lunsford Date: Thu, 20 Jun 2024 00:48:05 -0400 Subject: [PATCH 04/22] refactor: Update file paths in pyproject.toml --- pyproject.toml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index f7f2fec..1f80e4e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -53,10 +53,10 @@ build-backend = "poetry.core.masonry.api" [tool.versioneer] VCS = "git" style = "pep440-post" -versionfile_source = "src/WebexPythonSDK/_version.py" -versionfile_build = "WebexPythonSDK/_version.py" +versionfile_source = "src/webexpythonsdk/_version.py" +versionfile_build = "webexpythonsdk/_version.py" tag_prefix = "v" -parentdir_prefix = "WebexPythonSDK-" +parentdir_prefix = "webexpythonsdk-" [tool.pytest.ini_options] addopts = "--strict-markers" @@ -66,7 +66,7 @@ markers = ["slow", "manual"] line-length = 79 extend-exclude = [ "versioneer.py", - "src/WebexPythonSDK/_version.py", + "src/webexpythonsdk/_version.py", "generator/**", ] From defb05fe189d1d982b4bb48b03ed8b7ec26e21bb Mon Sep 17 00:00:00 2001 From: Chris Lunsford Date: Thu, 20 Jun 2024 19:14:45 -0400 Subject: [PATCH 05/22] refactor: Initial rebranding Webex Teams -> Webex --- .github/workflows/build-and-test.yml | 18 +- README.rst | 84 ++++----- docs/Makefile | 8 +- docs/conf.py | 20 +- docs/contributing.rst | 34 ++-- docs/index.rst | 46 ++--- docs/installation.rst | 20 +- docs/make.bat | 4 +- docs/user/api.rst | 112 +++++------ docs/user/api_structure_table.rst | 128 ++++++------- docs/user/cards.rst | 24 +-- docs/user/intro.rst | 50 ++--- docs/user/quickstart.rst | 178 +++++++++--------- examples/bot-example-flask.py | 22 +-- examples/bot-example-webpy.py | 20 +- examples/bot-with-card-example-flask.py | 20 +- examples/local_file_upload.py | 16 +- examples/ngrokwebhook.py | 10 +- examples/oauth-flask-ngrok.py | 6 +- examples/people.py | 12 +- examples/pyramidWebexTeamsBot/README.rst | 12 +- .../pyramidWebexTeamsBot.ini | 8 +- .../pyramidWebexTeamsBot/__init__.py | 2 +- .../pyramidWebexTeamsBot/views.py | 26 +-- examples/pyramidWebexTeamsBot/setup.py | 8 +- examples/simple.py | 16 +- generator/generate.py | 8 +- generator/models/meeting_invitees.yaml | 9 +- generator/templates/api.py | 12 +- script/ipython_console.py | 4 +- src/webexpythonsdk/__init__.py | 12 +- src/webexpythonsdk/_metadata.py | 10 +- src/webexpythonsdk/_version.py | 2 +- src/webexpythonsdk/api/__init__.py | 74 ++++---- src/webexpythonsdk/api/access_tokens.py | 14 +- src/webexpythonsdk/api/admin_audit_events.py | 16 +- src/webexpythonsdk/api/attachment_actions.py | 12 +- src/webexpythonsdk/api/events.py | 18 +- src/webexpythonsdk/api/guest_issuer.py | 12 +- src/webexpythonsdk/api/licenses.py | 14 +- src/webexpythonsdk/api/meeting_invitees.py | 14 +- src/webexpythonsdk/api/meeting_registrants.py | 12 +- src/webexpythonsdk/api/meeting_templates.py | 8 +- src/webexpythonsdk/api/meetings.py | 12 +- src/webexpythonsdk/api/memberships.py | 26 +-- src/webexpythonsdk/api/messages.py | 32 ++-- src/webexpythonsdk/api/organizations.py | 20 +- src/webexpythonsdk/api/people.py | 28 +-- src/webexpythonsdk/api/recordings.py | 26 +-- src/webexpythonsdk/api/roles.py | 14 +- src/webexpythonsdk/api/room_tabs.py | 24 +-- src/webexpythonsdk/api/rooms.py | 28 +-- src/webexpythonsdk/api/team_memberships.py | 26 +-- src/webexpythonsdk/api/teams.py | 26 +-- src/webexpythonsdk/api/webhooks.py | 26 +-- src/webexpythonsdk/config.py | 5 +- src/webexpythonsdk/environment.py | 2 +- src/webexpythonsdk/exceptions.py | 30 +-- src/webexpythonsdk/generator_containers.py | 2 +- src/webexpythonsdk/models/cards/__init__.py | 2 +- src/webexpythonsdk/models/cards/actions.py | 2 +- .../models/cards/adaptive_card_component.py | 2 +- src/webexpythonsdk/models/cards/card.py | 4 +- src/webexpythonsdk/models/cards/components.py | 2 +- src/webexpythonsdk/models/cards/container.py | 2 +- src/webexpythonsdk/models/cards/inputs.py | 2 +- src/webexpythonsdk/models/cards/options.py | 2 +- src/webexpythonsdk/models/cards/utils.py | 2 +- src/webexpythonsdk/models/dictionary.py | 6 +- src/webexpythonsdk/models/immutable.py | 52 ++--- .../models/mixins/access_token.py | 4 +- .../models/mixins/admin_audit_event.py | 6 +- .../models/mixins/attachment_action.py | 6 +- src/webexpythonsdk/models/mixins/event.py | 6 +- .../models/mixins/guest_issuer_token.py | 2 +- src/webexpythonsdk/models/mixins/license.py | 2 +- .../models/mixins/membership.py | 6 +- src/webexpythonsdk/models/mixins/message.py | 10 +- .../models/mixins/organization.py | 6 +- src/webexpythonsdk/models/mixins/person.py | 21 +-- src/webexpythonsdk/models/mixins/recording.py | 8 +- src/webexpythonsdk/models/mixins/role.py | 2 +- src/webexpythonsdk/models/mixins/room.py | 8 +- .../models/mixins/room_meeting_info.py | 2 +- src/webexpythonsdk/models/mixins/room_tab.py | 6 +- src/webexpythonsdk/models/mixins/team.py | 6 +- .../models/mixins/team_membership.py | 6 +- src/webexpythonsdk/models/mixins/webhook.py | 6 +- .../models/mixins/webhook_event.py | 2 +- src/webexpythonsdk/models/simple.py | 8 +- src/webexpythonsdk/response_codes.py | 2 +- src/webexpythonsdk/restsession.py | 38 ++-- src/webexpythonsdk/utils.py | 20 +- tests/api/__init__.py | 62 +++--- tests/api/test_admin_audit_events.py | 8 +- tests/api/test_attachment_actions.py | 6 +- tests/api/test_events.py | 6 +- tests/api/test_guest_issuer.py | 22 +-- tests/api/test_licenses.py | 6 +- tests/api/test_meeting_registrants.py | 14 +- tests/api/test_meetings.py | 10 +- tests/api/test_memberships.py | 6 +- tests/api/test_messages.py | 12 +- tests/api/test_organizations.py | 6 +- tests/api/test_people.py | 22 +-- tests/api/test_recordings.py | 8 +- tests/api/test_roles.py | 6 +- tests/api/test_room_tabs.py | 18 +- tests/api/test_rooms.py | 12 +- tests/api/test_teammemberships.py | 6 +- tests/api/test_teams.py | 10 +- tests/conftest.py | 14 +- tests/environment.py | 28 +-- tests/test_restsession.py | 6 +- tests/test_webexteamssdk.py | 58 +++--- tests/utils.py | 8 +- 116 files changed, 1047 insertions(+), 1050 deletions(-) diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml index 6454ef3..dc74666 100644 --- a/.github/workflows/build-and-test.yml +++ b/.github/workflows/build-and-test.yml @@ -24,18 +24,18 @@ jobs: - name: Get Webex Token id: webex_token run: | - WEBEX_TEAMS_ACCESS_TOKEN=$(curl -s ${{ secrets.WEBEX_TOKEN_KEEPER_URL }} | jq -r .access_token) - echo "WEBEX_TEAMS_ACCESS_TOKEN=$WEBEX_TEAMS_ACCESS_TOKEN" >> "$GITHUB_OUTPUT" - echo "::add-mask::$WEBEX_TEAMS_ACCESS_TOKEN" + WEBEX_ACCESS_TOKEN=$(curl -s ${{ secrets.WEBEX_TOKEN_KEEPER_URL }} | jq -r .access_token) + echo "WEBEX_ACCESS_TOKEN=$WEBEX_ACCESS_TOKEN" >> "$GITHUB_OUTPUT" + echo "::add-mask::$WEBEX_ACCESS_TOKEN" - name: Build and Test run: script/ci env: - WEBEX_TEAMS_ACCESS_TOKEN: ${{ steps.webex_token.outputs.WEBEX_TEAMS_ACCESS_TOKEN }} - WEBEX_TEAMS_TEST_DOMAIN: ${{ vars.WEBEX_TEAMS_TEST_DOMAIN }} - WEBEX_TEAMS_TEST_ID_START: ${{ vars.WEBEX_TEAMS_TEST_ID_START }} - WEBEX_TEAMS_TEST_FILE_URL: ${{ vars.WEBEX_TEAMS_TEST_FILE_URL }} - WEBEX_TEAMS_GUEST_ISSUER_ID: ${{ secrets.WEBEX_TEAMS_GUEST_ISSUER_ID }} - WEBEX_TEAMS_GUEST_ISSUER_SECRET: ${{ secrets.WEBEX_TEAMS_GUEST_ISSUER_SECRET }} + WEBEX_ACCESS_TOKEN: ${{ steps.webex_token.outputs.WEBEX_ACCESS_TOKEN }} + WEBEX_TEST_DOMAIN: ${{ vars.WEBEX_TEST_DOMAIN }} + WEBEX_TEST_ID_START: ${{ vars.WEBEX_TEST_ID_START }} + WEBEX_TEST_FILE_URL: ${{ vars.WEBEX_TEST_FILE_URL }} + WEBEX_GUEST_ISSUER_ID: ${{ secrets.WEBEX_GUEST_ISSUER_ID }} + WEBEX_GUEST_ISSUER_SECRET: ${{ secrets.WEBEX_GUEST_ISSUER_SECRET }} - name: Upload Distribution Files uses: actions/upload-artifact@v4 with: diff --git a/README.rst b/README.rst index 5448341..1f96fc4 100644 --- a/README.rst +++ b/README.rst @@ -1,49 +1,49 @@ ============= -webexteamssdk +webexpythonsdk ============= *Work with the Webex APIs in native Python!* .. image:: https://img.shields.io/badge/license-MIT-blue.svg :target: https://github.com/WebexCommunity/WebexPythonSDK/blob/master/LICENSE -.. image:: https://img.shields.io/pypi/v/webexteamssdk.svg - :target: https://pypi.org/project/webexteamssdk/ -.. image:: https://img.shields.io/pypi/dw/webexteamssdk.svg - :target: https://pypi.org/project/webexteamssdk/ -.. image:: https://readthedocs.org/projects/webexteamssdk/badge/?version=latest - :target: http://webexteamssdk.readthedocs.io/en/latest/?badge=latest +.. image:: https://img.shields.io/pypi/v/webexpythonsdk.svg + :target: https://pypi.org/project/webexpythonsdk/ +.. image:: https://img.shields.io/pypi/dw/webexpythonsdk.svg + :target: https://pypi.org/project/webexpythonsdk/ +.. image:: https://readthedocs.org/projects/webexpythonsdk/badge/?version=latest + :target: http://webexpythonsdk.readthedocs.io/en/latest/?badge=latest ------------------------------------------------------------------------------------------------------------------------ -**webexteamssdk** v1.7 will be the last 🤞 release of the `webexteamssdk` package. This will be the last release +**webexpythonsdk** v1.7 will be the last 🤞 release of the `webexpythonsdk` package. This will be the last release supporting Python v2 and v3 compatibility; it is compatible Python v3 releases *up to Python v3.10*. -Going forward, the `webexteamssdk` package will be replaced by the `WebexPythonSDK` package, which will support Python +Going forward, the `webexpythonsdk` package will be replaced by the `WebexPythonSDK` package, which will support Python v3.10+. ------------------------------------------------------------------------------------------------------------------------ -**webexteamssdk** is a *community developed* Python library for working with the Webex APIs. Our goal is to make +**webexpythonsdk** is a *community developed* Python library for working with the Webex APIs. Our goal is to make working with Webex in Python a *native* and *natural* experience! .. code-block:: Python - from webexteamssdk import WebexTeamsAPI + from webexpythonsdk import WebexAPI - api = WebexTeamsAPI() + api = WebexAPI() - # Find all rooms that have 'webexteamssdk Demo' in their title + # Find all rooms that have 'webexpythonsdk Demo' in their title all_rooms = api.rooms.list() - demo_rooms = [room for room in all_rooms if 'webexteamssdk Demo' in room.title] + demo_rooms = [room for room in all_rooms if 'webexpythonsdk Demo' in room.title] # Delete all of the demo rooms for room in demo_rooms: api.rooms.delete(room.id) # Create a new demo room - demo_room = api.rooms.create('webexteamssdk Demo') + demo_room = api.rooms.create('webexpythonsdk Demo') # Add people to the new demo room email_addresses = ["test01@cmlccie.com", "test02@cmlccie.com"] @@ -52,13 +52,13 @@ working with Webex in Python a *native* and *natural* experience! # Post a message to the new room, and upload a file api.messages.create(demo_room.id, text="Welcome to the room!", - files=["https://www.webex.com/content/dam/wbx/us/images/dg-integ/teams_icon.png"]) + files=["https://www.webex.com/content/dam/wbx/us/images/navigation/CiscoWebex-Logo_white.png"]) That's more than 6 Webex API calls in less than 23 lines of code (with comments and whitespace), and likely more -than that, since webexteamssdk handles pagination_ for you automatically! +than that, since webexpythonsdk handles pagination_ for you automatically! -webexteamssdk makes your life better... `Learn how!`__ +webexpythonsdk makes your life better... `Learn how!`__ __ Introduction_ @@ -66,7 +66,7 @@ __ Introduction_ Features -------- -webexteamssdk does all of this for you: +webexpythonsdk does all of this for you: * Transparently sources your Webex access token from your local environment @@ -75,9 +75,9 @@ webexteamssdk does all of this for you: * Represents all Webex API interactions using native Python tools - * Authentication and Connection to the Webex Cloud ==> **WebexTeamsAPI** "connection object" + * Authentication and Connection to the Webex Cloud ==> **WebexAPI** "connection object" - * API Calls ==> Hierarchically organized methods underneath the **WebexTeamsAPI** 'Connection Object' + * API Calls ==> Hierarchically organized methods underneath the **WebexAPI** 'Connection Object' * Returned Data Objects ==> Native Python objects @@ -93,28 +93,28 @@ webexteamssdk does all of this for you: Installation ------------ -Installing and upgrading webexteamssdk is easy: +Installing and upgrading webexpythonsdk is easy: **Install via PIP** .. code-block:: bash - $ pip install webexteamssdk + $ pip install webexpythonsdk **Upgrade to the latest version** .. code-block:: bash - $ pip install webexteamssdk --upgrade + $ pip install webexpythonsdk --upgrade Documentation ------------- **Excellent documentation is now available at:** -http://webexteamssdk.readthedocs.io +http://webexpythonsdk.readthedocs.io -Check out the Quickstart_ to dive in and begin using webexteamssdk. +Check out the Quickstart_ to dive in and begin using webexpythonsdk. Examples @@ -137,10 +137,10 @@ published releases. Questions, Support & Discussion ------------------------------- -webexteamssdk is a *community developed* and *community-supported* project. If you experience any issues using this +webexpythonsdk is a *community developed* and *community-supported* project. If you experience any issues using this package, please report them using the issues_ page. -Please join the `Python Webex Teams Devs`__ Webex space to ask questions, join the discussion, and share your +Please join the `Python Webex Devs`__ Webex space to ask questions, join the discussion, and share your projects and creations. __ Community_ @@ -149,14 +149,14 @@ __ Community_ Contribution ------------ -webexteamssdk is a community development project. Feedback, thoughts, ideas, and code contributions are welcome! +webexpythonsdk is a community development project. Feedback, thoughts, ideas, and code contributions are welcome! Please see the `Contributing`_ guide for more information. History ------- -The Webex Python SDK (webexteamssdk) library started as Cisco Spark API (ciscosparkapi). We updated the library's name in +The Webex Python SDK (webexpythonsdk) library started as Cisco Spark API (ciscosparkapi). We updated the library's name in alignment with Cisco's re-brand of Cisco Spark to Webex. The Cisco Spark API library has been deprecated and is no longer supported; however, its open-source codebase is still available in the `ciscosparkapi`_ branch of this repository. @@ -168,19 +168,19 @@ developer.webex.com. *Copyright (c) 2016-2024 Cisco and/or its affiliates.* -.. _Release Plan: https://github.com/CiscoDevNet/webexteamssdk/wiki/Release-Plans -.. _Introduction: http://webexteamssdk.readthedocs.io/en/latest/user/intro.html +.. _Release Plan: https://github.com/WebexCommunity/WebexPythonSDK/wiki/Release-Plans +.. _Introduction: http://webexpythonsdk.readthedocs.io/en/latest/user/intro.html .. _pagination: https://developer.webex.com/docs/basics#pagination -.. _webexteamssdk.readthedocs.io: https://webexteamssdk.readthedocs.io -.. _Quickstart: http://webexteamssdk.readthedocs.io/en/latest/user/quickstart.html -.. _examples: https://github.com/CiscoDevNet/webexteamssdk/tree/master/examples -.. _webexteamssdk: https://github.com/CiscoDevNet/webexteamssdk -.. _issues: https://github.com/CiscoDevNet/webexteamssdk/issues +.. _webexpythonsdk.readthedocs.io: https://webexpythonsdk.readthedocs.io +.. _Quickstart: http://webexpythonsdk.readthedocs.io/en/latest/user/quickstart.html +.. _examples: https://github.com/WebexCommunity/WebexPythonSDK/tree/master/examples +.. _webexpythonsdk: https://github.com/WebexCommunity/WebexPythonSDK +.. _issues: https://github.com/WebexCommunity/WebexPythonSDK/issues .. _Community: https://eurl.io/#HkMxO-_9- -.. _projects: https://github.com/CiscoDevNet/webexteamssdk/projects -.. _pull requests: https://github.com/CiscoDevNet/webexteamssdk/pulls -.. _releases: https://github.com/CiscoDevNet/webexteamssdk/releases -.. _the repository: webexteamssdk_ +.. _projects: https://github.com/WebexCommunity/WebexPythonSDK/projects +.. _pull requests: https://github.com/WebexCommunity/WebexPythonSDK/pulls +.. _releases: https://github.com/WebexCommunity/WebexPythonSDK/releases +.. _the repository: webexpythonsdk_ .. _pull request: `pull requests`_ -.. _Contributing: https://github.com/CiscoDevNet/webexteamssdk/blob/master/docs/contributing.rst +.. _Contributing: https://github.com/WebexCommunity/WebexPythonSDK/blob/master/docs/contributing.rst .. _ciscosparkapi: https://github.com/CiscoDevNet/ciscosparkapi/tree/ciscosparkapi diff --git a/docs/Makefile b/docs/Makefile index f7231a5..fa9a7b0 100644 --- a/docs/Makefile +++ b/docs/Makefile @@ -91,9 +91,9 @@ qthelp: @echo @echo "Build finished; now you can run "qcollectiongenerator" with the" \ ".qhcp project file in $(BUILDDIR)/qthelp, like this:" - @echo "# qcollectiongenerator $(BUILDDIR)/qthelp/webexteamssdk.qhcp" + @echo "# qcollectiongenerator $(BUILDDIR)/qthelp/webexpythonsdk.qhcp" @echo "To view the help file:" - @echo "# assistant -collectionFile $(BUILDDIR)/qthelp/webexteamssdk.qhc" + @echo "# assistant -collectionFile $(BUILDDIR)/qthelp/webexpythonsdk.qhc" .PHONY: applehelp applehelp: @@ -110,8 +110,8 @@ devhelp: @echo @echo "Build finished." @echo "To view the help file:" - @echo "# mkdir -p $$HOME/.local/share/devhelp/webexteamssdk" - @echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/webexteamssdk" + @echo "# mkdir -p $$HOME/.local/share/devhelp/webexpythonsdk" + @echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/webexpythonsdk" @echo "# devhelp" .PHONY: epub diff --git a/docs/conf.py b/docs/conf.py index 708b440..58fa8d8 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -7,10 +7,10 @@ sys.path.insert(0, os.path.abspath("..")) -from webexteamssdk._version import get_versions +from webexpythonsdk._version import get_versions -project = "webexteamssdk" +project = "webexpythonsdk" copyright = "Copyright (c) 2016-2024 Cisco and/or its affiliates." author = "Chris Lunsford" version = get_versions()["version"] @@ -74,7 +74,7 @@ # The name for this set of Sphinx documents. # " v documentation" by default. # -# html_title = u'webexteamssdk vv0.3' +# html_title = u'webexpythonsdk vv0.3' # A shorter title for the navigation bar. Default is the same as html_title. # @@ -174,7 +174,7 @@ # html_search_scorer = 'scorer.js' # Output file base name for HTML help builder. -htmlhelp_basename = "webexteamssdkdoc" +htmlhelp_basename = "webexpythonsdkdoc" # -- Options for LaTeX output --------------------------------------------- @@ -200,8 +200,8 @@ latex_documents = [ ( master_doc, - "webexteamssdk.tex", - "webexteamssdk Documentation", + "webexpythonsdk.tex", + "webexpythonsdk Documentation", "Chris Lunsford", "manual", ), @@ -245,7 +245,7 @@ # One entry per manual page. List of tuples # (source start file, name, description, authors, manual section). man_pages = [ - (master_doc, "webexteamssdk", "webexteamssdk Documentation", [author], 1) + (master_doc, "webexpythonsdk", "webexpythonsdk Documentation", [author], 1) ] # If true, show URL addresses after external links. @@ -261,10 +261,10 @@ texinfo_documents = [ ( master_doc, - "webexteamssdk", - "webexteamssdk Documentation", + "webexpythonsdk", + "webexpythonsdk Documentation", author, - "webexteamssdk", + "webexpythonsdk", "One line description of project.", "Miscellaneous", ), diff --git a/docs/contributing.rst b/docs/contributing.rst index 9cdac51..2ddc69e 100644 --- a/docs/contributing.rst +++ b/docs/contributing.rst @@ -4,7 +4,7 @@ Contributing ============ -*webexteamssdk* is a community development project. Feedback, thoughts, ideas, and code contributions are most welcome! +*webexpythonsdk* is a community development project. Feedback, thoughts, ideas, and code contributions are most welcome! How to contribute Feedback, Issues, Thoughts and Ideas @@ -12,7 +12,7 @@ How to contribute Feedback, Issues, Thoughts and Ideas Please use the `issues`_ page to report issues or post ideas for enhancement. -Join our `webexteamssdk - Webex Teams SDK - Python Community Contributors `_ Webex Teams space to join the conversation with other contributors to this project. +Join our `Webex Python SDK - Python Community Contributors `_ Webex space to join the conversation with other contributors to this project. @@ -29,7 +29,7 @@ We have created some scripts to automate everyday actions needed when working on Notes on the Test Suite ----------------------- -To test all the API endpoints, the account that you use for testing must be an *admin* user for your Webex Teams Organization. Additionally, you should know that that the testing process creates some test people, rooms, messages, teams, and etc. as part of executing the test suite. We strongly recommend *NOT* running the test suite using your personal Webex Teams account (not that you can't; it's just that you probably don't want it cluttering your account with all these test artifacts). +To test all the API endpoints, the account that you use for testing must be an *admin* user for your Webex Organization. Additionally, you should know that that the testing process creates some test people, rooms, messages, teams, and etc. as part of executing the test suite. We strongly recommend *NOT* running the test suite using your personal Webex account (not that you can't; it's just that you probably don't want it cluttering your account with all these test artifacts). If you cannot create a test account with *admin* privileges or configure your environment to run the test suite locally, you may always submit your code via a pull request. We will test your code before merging and releasing the changes. @@ -45,7 +45,7 @@ Contributing Code 4. Configure the following environment variables in your development environment: - * ``WEBEX_TEAMS_ACCESS_TOKEN`` - Your test account's Webex Teams access token. + * ``WEBEX_ACCESS_TOKEN`` - Your test account's Webex access token. 5. Add your code to your forked repository. @@ -65,30 +65,30 @@ Running the Test Suite Locally Configure the following environment variables in your development environment: -* ``WEBEX_TEAMS_ACCESS_TOKEN`` - Your test account's Webex Teams access token. +* ``WEBEX_ACCESS_TOKEN`` - Your test account's Webex access token. -* ``WEBEX_TEAMS_TEST_DOMAIN`` - The test suite creates some users as part of the testing process. The test suite uses this domain name as the e-mail suffix of for the user's e-mail addresses. +* ``WEBEX_TEST_DOMAIN`` - The test suite creates some users as part of the testing process. The test suite uses this domain name as the e-mail suffix of for the user's e-mail addresses. -* ``WEBEX_TEAMS_TEST_ID_START`` - The test suite uses this integer as the starting number for creating test user accounts (example: "test42@domain.com"). +* ``WEBEX_TEST_ID_START`` - The test suite uses this integer as the starting number for creating test user accounts (example: "test42@domain.com"). -* ``WEBEX_TEAMS_TEST_FILE_URL`` - Configure this environment variable with a URL referencing a file that can be downloaded and posted to Webex Teams as part of the testing process. +* ``WEBEX_TEST_FILE_URL`` - Configure this environment variable with a URL referencing a file that can be downloaded and posted to Webex as part of the testing process. *Example:* .. code-block:: bash #!/usr/bin/env bash - export WEBEX_TEAMS_ACCESS_TOKEN="" - export WEBEX_TEAMS_TEST_DOMAIN="domain.com" - export WEBEX_TEAMS_TEST_ID_START=42 - export WEBEX_TEAMS_TEST_FILE_URL="https://www.webex.com/content/dam/wbx/us/images/dg-integ/teams_icon.png" + export WEBEX_ACCESS_TOKEN="" + export WEBEX_TEST_DOMAIN="domain.com" + export WEBEX_TEST_ID_START=42 + export WEBEX_TEST_FILE_URL="https://www.webex.com/content/dam/wbx/us/images/navigation/CiscoWebex-Logo_white.png" Ensure your code passes all of the default tests. Run ``script/test`` and ensure all tests execute successfully. -.. _script: https://github.com/CiscoDevNet/webexteamssdk/tree/master/script -.. _issues: https://github.com/CiscoDevNet/webexteamssdk/issues -.. _repository: https://github.com/CiscoDevNet/webexteamssdk -.. _test: https://github.com/CiscoDevNet/webexteamssdk/tree/master/tests +.. _script: https://github.com/WebexCommunity/WebexPythonSDK/tree/master/script +.. _issues: https://github.com/WebexCommunity/WebexPythonSDK/issues +.. _repository: https://github.com/WebexCommunity/WebexPythonSDK +.. _test: https://github.com/WebexCommunity/WebexPythonSDK/tree/master/tests .. _PEP8: https://www.python.org/dev/peps/pep-0008/ -.. _pull request: https://github.com/CiscoDevNet/webexteamssdk/pulls +.. _pull request: https://github.com/WebexCommunity/WebexPythonSDK/pulls diff --git a/docs/index.rst b/docs/index.rst index a1def8e..8da377c 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -1,26 +1,26 @@ -.. currentmodule:: webexteamssdk +.. currentmodule:: webexpythonsdk ============= -webexteamssdk +webexpythonsdk ============= -*Simple, lightweight, scalable Python API wrapper for the Webex Teams APIs* +*Simple, lightweight, scalable Python API wrapper for the Webex APIs* ------------------------------------------------------------------------------- -Welcome to the docs! webexteamssdk is a *community developed* Pythonic wrapping of the Webex Teams APIs. The package represents all of the Cisco Webex Teams API interactions via native Python tools. Making working with the Cisco Webex Teams APIs in Python a *native* and *natural* experience. +Welcome to the docs! webexpythonsdk is a *community developed* Pythonic wrapping of the Webex APIs. The package represents all of the Cisco Webex API interactions via native Python tools. Making working with the Cisco Webex APIs in Python a *native* and *natural* experience. -**webexteamssdk helps you get things done faster.** We take care of the API semantics, and you can focus on writing your code. +**webexpythonsdk helps you get things done faster.** We take care of the API semantics, and you can focus on writing your code. -With webexteamssdk, you can easily: +With webexpythonsdk, you can easily: -* Interact with the Webex Teams APIs in an interactive Python session +* Interact with the Webex APIs in an interactive Python session -* Quickly create code that enables you get something done in Webex Teams +* Quickly create code that enables you get something done in Webex -* Leverage the API wrapper to cleanly add Webex Teams functionality to your project without having to write the boilerplate code for working with the Webex Teams APIs +* Leverage the API wrapper to cleanly add Webex functionality to your project without having to write the boilerplate code for working with the Webex APIs -To *dive in* and see how webexteamssdk makes your life better, check out the +To *dive in* and see how webexpythonsdk makes your life better, check out the :ref:`Quickstart`! The User Guide @@ -49,28 +49,28 @@ Interested in contributing to the project? Please review our community's Code o -General Information about the Webex Teams Service +General Information about the Webex Service ================================================= -What is Webex Teams? --------------------- +What is Webex? +-------------- - "Webex Teams is where all your work lives. Bring your teams together in a place that makes it easy to keep people and work connected." + "Webex is where all your work lives. Bring your together in a place that makes it easy to keep people and work connected." -Visit the official `Webex Teams`_ website for more information and to create a `free account`_! +Visit the official `Webex`_ website for more information and to create a `free account`_! -Webex Teams for Developers --------------------------- +Webex for Developers +-------------------- -Leveraging the Webex Teams APIs and developing on top of the Webex Teams cloud is easy. Signup for a `free account`_ and then head over to the `Webex Teams for Developers`_ website to learn more. +Leveraging the Webex APIs and developing on top of the Webex cloud is easy. Sign-up for a `free account`_ and then head over to the `Webex for Developers`_ website to learn more. *Copyright (c) 2016-2024 Cisco and/or its affiliates.* -.. _free account: `Webex Teams` -.. _Webex Teams: https://www.webex.com/products/teams/index.html -.. _Webex Teams for Developers: https://developer.webex.com/ -.. _contribution: https://github.com/CiscoDevNet/webexteamssdk#contribution -.. _webexteamssdk: https://github.com/CiscoDevNet/webexteamssdk +.. _free account: `Webex` +.. _Webex: https://www.webex.com/ +.. _Webex for Developers: https://developer.webex.com/ +.. _contribution: https://github.com/WebexCommunity/WebexPythonSDK#contribution +.. _webexpythonsdk: https://github.com/WebexCommunity/WebexPythonSDK diff --git a/docs/installation.rst b/docs/installation.rst index 658b34e..4aec983 100644 --- a/docs/installation.rst +++ b/docs/installation.rst @@ -10,14 +10,14 @@ Installation PIP Install ----------- -webexteamssdk is available via PIP and the `Python Package Index (PyPI)`_. To -install webexteamssdk, simply run this command from your terminal of choice: +webexpythonsdk is available via PIP and the `Python Package Index (PyPI)`_. To +install webexpythonsdk, simply run this command from your terminal of choice: .. code-block:: bash - $ pip install webexteamssdk + $ pip install webexpythonsdk -The webexteamssdk package is distributed as a *source distribution* (no +The webexpythonsdk package is distributed as a *source distribution* (no binaries). @@ -31,7 +31,7 @@ PIP: .. code-block:: bash - $ pip install webexteamssdk --upgrade + $ pip install webexpythonsdk --upgrade .. _Source Code: @@ -39,16 +39,16 @@ PIP: Get the Source Code ------------------- -webexteamssdk is developed on GitHub. If you like and use this package, +webexpythonsdk is developed on GitHub. If you like and use this package, please take a few seconds to Star the package on -the `CiscoDevNet/webexteamssdk`_ GitHub page. Your feedback and +the `WebexCommunity/WebexPythonSDK`_ GitHub page. Your feedback and contributions are always welcome. Use the following command to download the source code (GIT repository): .. code-block:: bash - $ git clone https://github.com/CiscoDevNet/webexteamssdk.git + $ git clone https://github.com/WebexCommunity/WebexPythonSDK.git You can then install the package to your environment, with the following command: @@ -61,5 +61,5 @@ command: *Copyright (c) 2016-2024 Cisco and/or its affiliates.* -.. _Python Package Index (PyPI): https://pypi.python.org/pypi/webexteamssdk -.. _CiscoDevNet/webexteamssdk: https://github.com/CiscoDevNet/webexteamssdk +.. _Python Package Index (PyPI): https://pypi.python.org/pypi/webexpythonsdk +.. _WebexCommunity/WebexPythonSDK: https://github.com/WebexCommunity/WebexPythonSDK diff --git a/docs/make.bat b/docs/make.bat index d75ff1a..8d5bd48 100644 --- a/docs/make.bat +++ b/docs/make.bat @@ -129,9 +129,9 @@ if "%1" == "qthelp" ( echo. echo.Build finished; now you can run "qcollectiongenerator" with the ^ .qhcp project file in %BUILDDIR%/qthelp, like this: - echo.^> qcollectiongenerator %BUILDDIR%\qthelp\webexteamssdk.qhcp + echo.^> qcollectiongenerator %BUILDDIR%\qthelp\webexpythonsdk.qhcp echo.To view the help file: - echo.^> assistant -collectionFile %BUILDDIR%\qthelp\webexteamssdk.ghc + echo.^> assistant -collectionFile %BUILDDIR%\qthelp\webexpythonsdk.ghc goto end ) diff --git a/docs/user/api.rst b/docs/user/api.rst index c9aad08..59781ff 100644 --- a/docs/user/api.rst +++ b/docs/user/api.rst @@ -1,26 +1,26 @@ .. _User API Doc: -.. currentmodule:: webexteamssdk +.. currentmodule:: webexpythonsdk ============ User API Doc ============ -WebexTeamsAPI +WebexAPI ============= -The :class:`WebexTeamsAPI` class creates "connection objects" for working with the Webex Teams APIs and hierarchically organizes the Webex Teams APIs and their endpoints underneath these connection objects. +The :class:`WebexAPI` class creates "connection objects" for working with the Webex APIs and hierarchically organizes the Webex APIs and their endpoints underneath these connection objects. .. include:: api_structure_table.rst -.. autoclass:: WebexTeamsAPI() +.. autoclass:: WebexAPI() :members: :exclude-members: access_token, base_url - .. automethod:: WebexTeamsAPI.__init__ + .. automethod:: WebexAPI.__init__ .. _access_tokens: @@ -28,7 +28,7 @@ The :class:`WebexTeamsAPI` class creates "connection objects" for working with t access_tokens ------------- -.. autoclass:: webexteamssdk.api.access_tokens.AccessTokensAPI() +.. autoclass:: webexpythonsdk.api.access_tokens.AccessTokensAPI() .. _admin_audit_events: @@ -36,7 +36,7 @@ access_tokens admin_audit_events ------------------ -.. autoclass:: webexteamssdk.api.admin_audit_events.AdminAuditEventsAPI() +.. autoclass:: webexpythonsdk.api.admin_audit_events.AdminAuditEventsAPI() .. _attachment_actions: @@ -44,7 +44,7 @@ admin_audit_events attachment_actions ------------------ -.. autoclass:: webexteamssdk.api.attachment_actions.AttachmentActionsAPI() +.. autoclass:: webexpythonsdk.api.attachment_actions.AttachmentActionsAPI() .. _events: @@ -52,7 +52,7 @@ attachment_actions events ------ -.. autoclass:: webexteamssdk.api.events.EventsAPI() +.. autoclass:: webexpythonsdk.api.events.EventsAPI() .. _guest_issuer: @@ -60,7 +60,7 @@ events guest_issuer ------------ -.. autoclass:: webexteamssdk.api.guest_issuer.GuestIssuerAPI() +.. autoclass:: webexpythonsdk.api.guest_issuer.GuestIssuerAPI() .. _licenses: @@ -68,7 +68,7 @@ guest_issuer licenses -------- -.. autoclass:: webexteamssdk.api.licenses.LicensesAPI() +.. autoclass:: webexpythonsdk.api.licenses.LicensesAPI() .. _memberships: @@ -76,7 +76,7 @@ licenses memberships ----------- -.. autoclass:: webexteamssdk.api.memberships.MembershipsAPI() +.. autoclass:: webexpythonsdk.api.memberships.MembershipsAPI() .. _messages: @@ -84,7 +84,7 @@ memberships messages -------- -.. autoclass:: webexteamssdk.api.messages.MessagesAPI() +.. autoclass:: webexpythonsdk.api.messages.MessagesAPI() .. _organizations: @@ -92,7 +92,7 @@ messages organizations ------------- -.. autoclass:: webexteamssdk.api.organizations.OrganizationsAPI() +.. autoclass:: webexpythonsdk.api.organizations.OrganizationsAPI() .. _people: @@ -100,7 +100,7 @@ organizations people ------ -.. autoclass:: webexteamssdk.api.people.PeopleAPI() +.. autoclass:: webexpythonsdk.api.people.PeopleAPI() .. _roles: @@ -108,7 +108,7 @@ people roles ----- -.. autoclass:: webexteamssdk.api.roles.RolesAPI() +.. autoclass:: webexpythonsdk.api.roles.RolesAPI() .. _rooms: @@ -116,7 +116,7 @@ roles rooms ----- -.. autoclass:: webexteamssdk.api.rooms.RoomsAPI() +.. autoclass:: webexpythonsdk.api.rooms.RoomsAPI() .. _teams: @@ -124,7 +124,7 @@ rooms teams ----- -.. autoclass:: webexteamssdk.api.teams.TeamsAPI() +.. autoclass:: webexpythonsdk.api.teams.TeamsAPI() .. _team_memberships: @@ -132,7 +132,7 @@ teams team_memberships ---------------- -.. autoclass:: webexteamssdk.api.team_memberships.TeamMembershipsAPI() +.. autoclass:: webexpythonsdk.api.team_memberships.TeamMembershipsAPI() .. _webhooks: @@ -140,13 +140,13 @@ team_memberships webhooks -------- -.. autoclass:: webexteamssdk.api.webhooks.WebhooksAPI() +.. autoclass:: webexpythonsdk.api.webhooks.WebhooksAPI() -.. _Webex Teams Data Objects: +.. _Webex Data Objects: -Webex Teams Data Objects -======================== +Webex Data Objects +================== .. _Access Token: @@ -307,7 +307,7 @@ Webhook Event Exceptions ========== -.. autoexception:: webexteamssdkException() +.. autoexception:: webexpythonsdkException() :show-inheritance: :members: @@ -333,7 +333,7 @@ Exceptions Warnings ======== -.. autoexception:: webexteamssdkWarning() +.. autoexception:: webexpythonsdkWarning() :show-inheritance: :members: @@ -350,88 +350,88 @@ Warnings Cards and Buttons ================= -.. autoclass:: webexteamssdk.cards.card.AdaptiveCard() +.. autoclass:: webexpythonsdk.cards.card.AdaptiveCard() Components ---------- -.. autoclass:: webexteamssdk.cards.components.Image() +.. autoclass:: webexpythonsdk.cards.components.Image() :members: .. automethod:: __init__ -.. autoclass:: webexteamssdk.cards.components.TextBlock() +.. autoclass:: webexpythonsdk.cards.components.TextBlock() :members: .. automethod:: __init__ -.. autoclass:: webexteamssdk.cards.components.Column() +.. autoclass:: webexpythonsdk.cards.components.Column() -.. autoclass:: webexteamssdk.cards.components.Fact() +.. autoclass:: webexpythonsdk.cards.components.Fact() -.. autoclass:: webexteamssdk.cards.components.Choice() +.. autoclass:: webexpythonsdk.cards.components.Choice() Options ------- -.. autoclass:: webexteamssdk.cards.options.VerticalContentAlignment() +.. autoclass:: webexpythonsdk.cards.options.VerticalContentAlignment() -.. autoclass:: webexteamssdk.cards.options.Colors() +.. autoclass:: webexpythonsdk.cards.options.Colors() -.. autoclass:: webexteamssdk.cards.options.HorizontalAlignment() +.. autoclass:: webexpythonsdk.cards.options.HorizontalAlignment() -.. autoclass:: webexteamssdk.cards.options.FontSize() +.. autoclass:: webexpythonsdk.cards.options.FontSize() -.. autoclass:: webexteamssdk.cards.options.FontWeight() +.. autoclass:: webexpythonsdk.cards.options.FontWeight() -.. autoclass:: webexteamssdk.cards.options.BlockElementHeight() +.. autoclass:: webexpythonsdk.cards.options.BlockElementHeight() -.. autoclass:: webexteamssdk.cards.options.Spacing() +.. autoclass:: webexpythonsdk.cards.options.Spacing() -.. autoclass:: webexteamssdk.cards.options.ImageSize() +.. autoclass:: webexpythonsdk.cards.options.ImageSize() -.. autoclass:: webexteamssdk.cards.options.ImageStyle() +.. autoclass:: webexpythonsdk.cards.options.ImageStyle() -.. autoclass:: webexteamssdk.cards.options.ContainerStyle() +.. autoclass:: webexpythonsdk.cards.options.ContainerStyle() -.. autoclass:: webexteamssdk.cards.options.TextInputStyle() +.. autoclass:: webexpythonsdk.cards.options.TextInputStyle() -.. autoclass:: webexteamssdk.cards.options.ChoiceInputStyle() +.. autoclass:: webexpythonsdk.cards.options.ChoiceInputStyle() Container --------- -.. autoclass:: webexteamssdk.cards.container.Container() +.. autoclass:: webexpythonsdk.cards.container.Container() -.. autoclass:: webexteamssdk.cards.container.ColumnSet() +.. autoclass:: webexpythonsdk.cards.container.ColumnSet() -.. autoclass:: webexteamssdk.cards.container.FactSet() +.. autoclass:: webexpythonsdk.cards.container.FactSet() -.. autoclass:: webexteamssdk.cards.container.ImageSet() +.. autoclass:: webexpythonsdk.cards.container.ImageSet() Inputs ------ -.. autoclass:: webexteamssdk.cards.inputs.Text() +.. autoclass:: webexpythonsdk.cards.inputs.Text() -.. autoclass:: webexteamssdk.cards.inputs.Number() +.. autoclass:: webexpythonsdk.cards.inputs.Number() -.. autoclass:: webexteamssdk.cards.inputs.Date() +.. autoclass:: webexpythonsdk.cards.inputs.Date() -.. autoclass:: webexteamssdk.cards.inputs.Time() +.. autoclass:: webexpythonsdk.cards.inputs.Time() -.. autoclass:: webexteamssdk.cards.inputs.Toggle() +.. autoclass:: webexpythonsdk.cards.inputs.Toggle() -.. autoclass:: webexteamssdk.cards.inputs.Choices() +.. autoclass:: webexpythonsdk.cards.inputs.Choices() Actions ------- -.. autoclass:: webexteamssdk.cards.actions.OpenUrl +.. autoclass:: webexpythonsdk.cards.actions.OpenUrl -.. autoclass:: webexteamssdk.cards.actions.Submit +.. autoclass:: webexpythonsdk.cards.actions.Submit -.. autoclass:: webexteamssdk.cards.actions.ShowCard +.. autoclass:: webexpythonsdk.cards.actions.ShowCard *Copyright (c) 2016-2024 Cisco and/or its affiliates.* diff --git a/docs/user/api_structure_table.rst b/docs/user/api_structure_table.rst index 47e7650..2c2ec6e 100644 --- a/docs/user/api_structure_table.rst +++ b/docs/user/api_structure_table.rst @@ -1,66 +1,66 @@ +------------------------+---------------------------+---------------------------------------------------------------------------------+ -| :class:`WebexTeamsAPI` | :ref:`access_tokens` | :meth:`get() ` | -| | | :meth:`refresh() ` | -+------------------------+---------------------------+---------------------------------------------------------------------------------+ -| | :ref:`admin_audit_events` | :meth:`list() ` | -+------------------------+---------------------------+---------------------------------------------------------------------------------+ -| | :ref:`attachment_actions` | :meth:`create() ` | -| | | :meth:`get() ` | -+------------------------+---------------------------+---------------------------------------------------------------------------------+ -| | :ref:`events` | :meth:`list() ` | -| | | :meth:`get() ` | -+------------------------+---------------------------+---------------------------------------------------------------------------------+ -| | :ref:`guest_issuer` | :meth:`create() ` | -+------------------------+---------------------------+---------------------------------------------------------------------------------+ -| | :ref:`licenses` | :meth:`list() ` | -| | | :meth:`create() ` | -+------------------------+---------------------------+---------------------------------------------------------------------------------+ -| | :ref:`memberships` | :meth:`list() ` | -| | | :meth:`create() ` | -| | | :meth:`get() ` | -| | | :meth:`update() ` | -| | | :meth:`delete() ` | -+------------------------+---------------------------+---------------------------------------------------------------------------------+ -| | :ref:`messages` | :meth:`list() ` | -| | | :meth:`list_direct() ` | -| | | :meth:`create() ` | -| | | :meth:`get() ` | -| | | :meth:`delete() ` | -+------------------------+---------------------------+---------------------------------------------------------------------------------+ -| | :ref:`organizations` | :meth:`list() ` | -| | | :meth:`create() ` | -+------------------------+---------------------------+---------------------------------------------------------------------------------+ -| | :ref:`people` | :meth:`list() ` | -| | | :meth:`create() ` | -| | | :meth:`get() ` | -| | | :meth:`update() ` | -| | | :meth:`me() ` | -+------------------------+---------------------------+---------------------------------------------------------------------------------+ -| | :ref:`roles` | :meth:`list() ` | -| | | :meth:`create() ` | -+------------------------+---------------------------+---------------------------------------------------------------------------------+ -| | :ref:`rooms` | :meth:`list() ` | -| | | :meth:`create() ` | -| | | :meth:`get() ` | -| | | :meth:`get_meeting_info() ` | -| | | :meth:`update() ` | -| | | :meth:`delete() ` | -+------------------------+---------------------------+---------------------------------------------------------------------------------+ -| | :ref:`team_memberships` | :meth:`list() ` | -| | | :meth:`create() ` | -| | | :meth:`get() ` | -| | | :meth:`update() ` | -| | | :meth:`delete() ` | -+------------------------+---------------------------+---------------------------------------------------------------------------------+ -| | :ref:`teams` | :meth:`list() ` | -| | | :meth:`create() ` | -| | | :meth:`get() ` | -| | | :meth:`update() ` | -| | | :meth:`delete() ` | -+------------------------+---------------------------+---------------------------------------------------------------------------------+ -| | :ref:`webhooks` | :meth:`list() ` | -| | | :meth:`create() ` | -| | | :meth:`get() ` | -| | | :meth:`update() ` | -| | | :meth:`delete() ` | +| :class:`WebexAPI` | :ref:`access_tokens` | :meth:`get() ` | +| | | :meth:`refresh() ` | ++------------------------+---------------------------+---------------------------------------------------------------------------------+ +| | :ref:`admin_audit_events` | :meth:`list() ` | ++------------------------+---------------------------+---------------------------------------------------------------------------------+ +| | :ref:`attachment_actions` | :meth:`create() ` | +| | | :meth:`get() ` | ++------------------------+---------------------------+---------------------------------------------------------------------------------+ +| | :ref:`events` | :meth:`list() ` | +| | | :meth:`get() ` | ++------------------------+---------------------------+---------------------------------------------------------------------------------+ +| | :ref:`guest_issuer` | :meth:`create() ` | ++------------------------+---------------------------+---------------------------------------------------------------------------------+ +| | :ref:`licenses` | :meth:`list() ` | +| | | :meth:`create() ` | ++------------------------+---------------------------+---------------------------------------------------------------------------------+ +| | :ref:`memberships` | :meth:`list() ` | +| | | :meth:`create() ` | +| | | :meth:`get() ` | +| | | :meth:`update() ` | +| | | :meth:`delete() ` | ++------------------------+---------------------------+---------------------------------------------------------------------------------+ +| | :ref:`messages` | :meth:`list() ` | +| | | :meth:`list_direct() ` | +| | | :meth:`create() ` | +| | | :meth:`get() ` | +| | | :meth:`delete() ` | ++------------------------+---------------------------+---------------------------------------------------------------------------------+ +| | :ref:`organizations` | :meth:`list() ` | +| | | :meth:`create() ` | ++------------------------+---------------------------+---------------------------------------------------------------------------------+ +| | :ref:`people` | :meth:`list() ` | +| | | :meth:`create() ` | +| | | :meth:`get() ` | +| | | :meth:`update() ` | +| | | :meth:`me() ` | ++------------------------+---------------------------+---------------------------------------------------------------------------------+ +| | :ref:`roles` | :meth:`list() ` | +| | | :meth:`create() ` | ++------------------------+---------------------------+---------------------------------------------------------------------------------+ +| | :ref:`rooms` | :meth:`list() ` | +| | | :meth:`create() ` | +| | | :meth:`get() ` | +| | | :meth:`get_meeting_info() ` | +| | | :meth:`update() ` | +| | | :meth:`delete() ` | ++------------------------+---------------------------+---------------------------------------------------------------------------------+ +| | :ref:`team_memberships` | :meth:`list() ` | +| | | :meth:`create() ` | +| | | :meth:`get() ` | +| | | :meth:`update() ` | +| | | :meth:`delete() ` | ++------------------------+---------------------------+---------------------------------------------------------------------------------+ +| | :ref:`teams` | :meth:`list() ` | +| | | :meth:`create() ` | +| | | :meth:`get() ` | +| | | :meth:`update() ` | +| | | :meth:`delete() ` | ++------------------------+---------------------------+---------------------------------------------------------------------------------+ +| | :ref:`webhooks` | :meth:`list() ` | +| | | :meth:`create() ` | +| | | :meth:`get() ` | +| | | :meth:`update() ` | +| | | :meth:`delete() ` | +------------------------+---------------------------+---------------------------------------------------------------------------------+ diff --git a/docs/user/cards.rst b/docs/user/cards.rst index f816f5b..9a7352f 100644 --- a/docs/user/cards.rst +++ b/docs/user/cards.rst @@ -8,7 +8,7 @@ Webex supports `AdaptiveCards `_ to allow new levels of interactivity for bots and integrations. You can read more about how cards and buttons work `in the official guide `_. -In this guide I want to cover the abstraction built into the webexteamssdk that +In this guide I want to cover the abstraction built into the webexpythonsdk that lets you author adaptive cards in pure python without having to touch the underlying JSON of an adaptive card. @@ -19,11 +19,11 @@ Lets dive into a simple example that sends a card to a room .. code-block:: python - from webexteamssdk import WebexTeamsAPI - from webexteamssdk.models.cards.card import AdaptiveCard - from webexteamssdk.models.cards.inputs import Text, Number - from webexteamssdk.models.cards.components import TextBlock - from webexteamssdk.models.cards.actions import Submit + from webexpythonsdk import WebexAPI + from webexpythonsdk.models.cards.card import AdaptiveCard + from webexpythonsdk.models.cards.inputs import Text, Number + from webexpythonsdk.models.cards.components import TextBlock + from webexpythonsdk.models.cards.actions import Submit greeting = TextBlock("Hey hello there! I am a adaptive card") first_name = Text('first_name', placeholder="First Name") @@ -33,7 +33,7 @@ Lets dive into a simple example that sends a card to a room card = AdaptiveCard(body=[greeting, first_name, age], actions=[submit]) - api = WebexTeamsAPI() + api = WebexAPI() api.messages.create(text="fallback", roomId="...", attachments=[card]) The message we send with this code then looks like this in our Webex space @@ -46,9 +46,9 @@ Processing a card action ======================== -Adaptive card interactions are treated as "attachment actions". Once user interacts -with your card and submits an action, your app will receive a webhook from Webex. You -must :ref:`setup a webhook ` in advance with ``resource = "attachmentActions"`` +Adaptive card interactions are treated as "attachment actions". Once user interacts +with your card and submits an action, your app will receive a webhook from Webex. You +must :ref:`setup a webhook ` in advance with ``resource = "attachmentActions"`` and ``event = "created"``. Webhook payload will contain a JSON: @@ -64,8 +64,8 @@ Webhook payload will contain a JSON: } } -Extract attachment action ID from ``['data']['id']`` and -use :ref:`attachment_actions.get() ` to get full information +Extract attachment action ID from ``['data']['id']`` and +use :ref:`attachment_actions.get() ` to get full information about user action and any submitted data. .. code-block:: python diff --git a/docs/user/intro.rst b/docs/user/intro.rst index 8a6ecdc..684cd54 100644 --- a/docs/user/intro.rst +++ b/docs/user/intro.rst @@ -5,10 +5,10 @@ Introduction ============ -Work with the Webex Teams APIs in Native Python! ------------------------------------------------- +Work with the Webex APIs in Native Python! +------------------------------------------ -Sure, working with the Webex Teams APIs is easy (see +Sure, working with the Webex APIs is easy (see `developer.webex.com`_). They are RESTful, naturally structured, require only a simple Access Token for authentication, and the data is elegantly represented in intuitive JSON. What could be easier? @@ -47,16 +47,16 @@ Like I said, EASY. However, in use, the code can become rather repetitive... - When requesting lists of items, you have to deal with pagination_ -Enter **webexteamssdk**, a simple API wrapper that wraps all of the Webex Teams API +Enter **webexpythonsdk**, a simple API wrapper that wraps all of the Webex API calls and returned JSON objects within native Python objects and methods. -With webexteamssdk, the above Python code can be consolidated to the following: +With webexpythonsdk, the above Python code can be consolidated to the following: .. code-block:: python - from webexteamssdk import WebexTeamsAPI + from webexpythonsdk import WebexAPI - api = WebexTeamsAPI() + api = WebexAPI() try: message = api.messages.create('', text='') print("New message created, with ID:", message.id) @@ -65,12 +65,12 @@ With webexteamssdk, the above Python code can be consolidated to the following: print(e) -**webexteamssdk handles all of this for you:** +**webexpythonsdk handles all of this for you:** -+ Reads your Webex Teams access token from a ``WEBEX_TEAMS_ACCESS_TOKEN`` environment ++ Reads your Webex access token from a ``WEBEX_ACCESS_TOKEN`` environment variable -+ Wraps and represents all Webex Teams API calls as a simple hierarchical tree of ++ Wraps and represents all Webex API calls as a simple hierarchical tree of native-Python methods (with default arguments provided everywhere possible!) + If your Python IDE supports **auto-completion** (like PyCharm_), you can @@ -80,14 +80,14 @@ With webexteamssdk, the above Python code can be consolidated to the following: access all of the object's attributes using native *dot.syntax* + **Automatic and Transparent Pagination!** When requesting 'lists of objects' - from Webex Teams, requests for additional pages of responses are efficiently and + from Webex, requests for additional pages of responses are efficiently and automatically requested as needed -+ **Automatic Rate-Limit Handling** Sending a lot of requests to Webex Teams? - Don't worry; we have you covered. Webex Teams will respond with a rate-limit ++ **Automatic Rate-Limit Handling** Sending a lot of requests to Webex? + Don't worry; we have you covered. Webex will respond with a rate-limit response, which will automatically be caught and "handled" for you. Your requests and script will automatically be "paused" for the amount of time - specified by Webex Teams, while we wait for the Webex Teams rate-limit timer to cool + specified by Webex, while we wait for the Webex rate-limit timer to cool down. After the cool-down, your request will automatically be retried, and your script will continue to run as normal. Handling all of this requires zero (0) changes to your code - you're welcome. 😎 @@ -103,20 +103,20 @@ All of this, combined, lets you do powerful things simply: .. code-block:: python - from webexteamssdk import WebexTeamsAPI + from webexpythonsdk import WebexAPI - api = WebexTeamsAPI() + api = WebexAPI() - # Find all rooms that have 'webexteamssdk Demo' in their title + # Find all rooms that have 'webexpythonsdk Demo' in their title all_rooms = api.rooms.list() - demo_rooms = [room for room in all_rooms if 'webexteamssdk Demo' in room.title] + demo_rooms = [room for room in all_rooms if 'webexpythonsdk Demo' in room.title] # Delete all of the demo rooms for room in demo_rooms: api.rooms.delete(room.id) # Create a new demo room - demo_room = api.rooms.create('webexteamssdk Demo') + demo_room = api.rooms.create('webexpythonsdk Demo') # Add people to the new demo room email_addresses = ["test01@cmlccie.com", "test02@cmlccie.com"] @@ -125,15 +125,15 @@ All of this, combined, lets you do powerful things simply: # Post a message to the new room, and upload a file api.messages.create(demo_room.id, text="Welcome to the room!", - files=["https://www.webex.com/content/dam/wbx/us/images/dg-integ/teams_icon.png"]) + files=["https://www.webex.com/content/dam/wbx/us/images/navigation/CiscoWebex-Logo_white.png"]) -That's more than 6 Webex Teams API calls in less than 23 lines of code (with comments -and whitespace), and likely more than that since webexteamssdk handles +That's more than 6 Webex API calls in less than 23 lines of code (with comments +and whitespace), and likely more than that since webexpythonsdk handles pagination_ for you automatically! Head over to the :ref:`Quickstart` page to begin working with the -**Webex Teams APIs in native Python**! +**Webex APIs in native Python**! .. _MITLicense: @@ -141,11 +141,11 @@ Head over to the :ref:`Quickstart` page to begin working with the MIT License ----------- -webexteamssdk is currently licensed under the `MIT Open Source License`_, and +webexpythonsdk is currently licensed under the `MIT Open Source License`_, and distributed as a source distribution (no binaries) via :ref:`PyPI `, and the complete :ref:`source code ` is available on GitHub. -webexteamssdk License +webexpythonsdk License --------------------- .. include:: ../../LICENSE diff --git a/docs/user/quickstart.rst b/docs/user/quickstart.rst index d6012b3..0cbbc42 100644 --- a/docs/user/quickstart.rst +++ b/docs/user/quickstart.rst @@ -1,26 +1,26 @@ .. _Quickstart: -.. currentmodule:: webexteamssdk +.. currentmodule:: webexpythonsdk ========== Quickstart ========== -*Dive in!* ...to get started using the webexteamssdk package: +*Dive in!* ...to get started using the webexpythonsdk package: Make sure that you have: -* A Webex Teams Account *(a free account works fine,* `sign-up for one here`__ *)* -* webexteamssdk :ref:`installed ` -* webexteamssdk :ref:`upgraded to the latest version ` +* A Webex Account *(a free account works fine,* `sign-up for one here`__ *)* +* webexpythonsdk :ref:`installed ` +* webexpythonsdk :ref:`upgraded to the latest version ` -__ Webex Teams_ +__ Webex_ -Get your Webex Teams Access Token +Get your Webex Access Token --------------------------------- -To interact with the Webex Teams APIs, you must have a **Webex Teams Access Token**. -A Webex Teams Access Token is how the Webex Teams APIs validate access and identify the +To interact with the Webex APIs, you must have a **Webex Access Token**. +A Webex Access Token is how the Webex APIs validate access and identify the requesting user. To get your personal access token: @@ -39,12 +39,12 @@ To get your personal access token: applications." -Use your Webex Teams Access Token +Use your Webex Access Token --------------------------------- -As a `best practice`__, you can store your Webex Teams access token 'credential' as +As a `best practice`__, you can store your Webex access token 'credential' as an environment variable in your development or production environment. By -default, webexteamssdk will look for a ``WEBEX_TEAMS_ACCESS_TOKEN`` environment +default, webexpythonsdk will look for a ``WEBEX_ACCESS_TOKEN`` environment variable when creating new connection objects. __ https://12factor.net/config @@ -60,7 +60,7 @@ It can be as simple as setting it in your CLI before running your script... .. code-block:: bash - $ export WEBEX_TEAMS_ACCESS_TOKEN=your_access_token_here + $ export WEBEX_ACCESS_TOKEN=your_access_token_here $ python myscript.py ...or putting your credentials in a shell script that you ``source`` when your @@ -69,58 +69,58 @@ shell starts up or before your run a script: .. code-block:: bash $ cat mycredentials.sh - export WEBEX_TEAMS_ACCESS_TOKEN=your_access_token_here + export WEBEX_ACCESS_TOKEN=your_access_token_here $ source mycredentials.sh $ python myscript.py However you choose to set it, if you have your access token stored in a -``WEBEX_TEAMS_ACCESS_TOKEN`` environment variable when using webexteamssdk, you are -good to go. webexteamssdk will pull and use this access token, by default, -when creating new :class:`WebexTeamsAPI` objects. +``WEBEX_ACCESS_TOKEN`` environment variable when using webexpythonsdk, you are +good to go. webexpythonsdk will pull and use this access token, by default, +when creating new :class:`WebexAPI` objects. If you don't want to set your access token as an environment variable, or perhaps your application will acquire access tokens via some other means, you -can manually provide your access token when creating a WebexTeamsAPI object. +can manually provide your access token when creating a WebexAPI object. -Create a WebexTeamsAPI "Connection Object" +Create a WebexAPI "Connection Object" ------------------------------------------ -To make interacting with the Webex Teams APIs as simple and intuitive as +To make interacting with the Webex APIs as simple and intuitive as possible, all of the APIs have 'wrapped' underneath a single interface. To get -started, import the :class:`WebexTeamsAPI` class and create an API "connection +started, import the :class:`WebexAPI` class and create an API "connection object". .. code-block:: python - >>> from webexteamssdk import WebexTeamsAPI - >>> api = WebexTeamsAPI() + >>> from webexpythonsdk import WebexAPI + >>> api = WebexAPI() -As discussed above (`Use your Webex Teams Access Token`_), webexteamssdk defaults -to pulling your Webex Teams access token from a ``WEBEX_TEAMS_ACCESS_TOKEN`` environment +As discussed above (`Use your Webex Access Token`_), webexpythonsdk defaults +to pulling your Webex access token from a ``WEBEX_ACCESS_TOKEN`` environment variable. If you do not have this environment variable set and you try to -create a new :class:`WebexTeamsAPI` object without providing a Webex Teams access -token, a :exc:`webexteamssdkException` will be raised. +create a new :class:`WebexAPI` object without providing a Webex access +token, a :exc:`webexpythonsdkException` will be raised. .. code-block:: python - >>> from webexteamssdk import WebexTeamsAPI - >>> api = WebexTeamsAPI() + >>> from webexpythonsdk import WebexAPI + >>> api = WebexAPI() Traceback (most recent call last): File "", line 1, in - File "webexteamssdk/__init__.py", line 114, in __init__ - raise webexteamssdkException(error_message) - webexteamssdkException: You must provide an Webex Teams access token to interact - with the Webex Teams APIs, either via a WEBEX_TEAMS_ACCESS_TOKEN environment + File "webexpythonsdk/__init__.py", line 114, in __init__ + raise webexpythonsdkException(error_message) + webexpythonsdkException: You must provide an Webex access token to interact + with the Webex APIs, either via a WEBEX_ACCESS_TOKEN environment variable or via the access_token argument. Use the ``access_token`` argument to manually provide your access token, when -creating a new :class:`WebexTeamsAPI` connection object. +creating a new :class:`WebexAPI` connection object. .. code-block:: python - >>> from webexteamssdk import WebexTeamsAPI - >>> api = WebexTeamsAPI(access_token='lkj345w...') + >>> from webexpythonsdk import WebexAPI + >>> api = WebexAPI(access_token='lkj345w...') Note that this can be very useful if you are reading in access token(s) from a file or database and/or when you want to create more than one connection @@ -128,23 +128,23 @@ object. .. code-block:: python - >>> from webexteamssdk import WebexTeamsAPI + >>> from webexpythonsdk import WebexAPI >>> chris_at = 'lkj345w...' >>> veronica_at = 'kl45kln...' - >>> chris_api = WebexTeamsAPI(access_token=chris_at) - >>> veronica_api = WebexTeamsAPI(access_token=veronica_at) + >>> chris_api = WebexAPI(access_token=chris_at) + >>> veronica_api = WebexAPI(access_token=veronica_at) If you authenticate a user via a OAuth flow you can also initialize a api object directly by providing the OAuth information. .. code-block:: python - >>> from webexteamssdk import WebexTeamsAPI + >>> from webexpythonsdk import WebexAPI >>> client_id = "" >>> client_secret = "" >>> oauth_code = "" >>> redirect_uri = "" - >>> api = WebexTeamsAPI(client_id=client_id, + >>> api = WebexAPI(client_id=client_id, client_secret=client_secret, oauth_code=oauth_code, redirect_uri=redirect_uri @@ -155,15 +155,15 @@ documentation on Proxies >> from webexteamssdk import WebexTeamsAPI + >>> from webexpythonsdk import WebexAPI >>> proxy = {'https': 'http://:'} - >>> api = WebexTeamsAPI(access_token=, proxies=proxy) + >>> api = WebexAPI(access_token=, proxies=proxy) Making API Calls ---------------- -Now that you have created a :class:`WebexTeamsAPI` "connection object," you are +Now that you have created a :class:`WebexAPI` "connection object," you are ready to start making API calls. .. code-block:: python @@ -174,7 +174,7 @@ ready to start making API calls. It really is that easy. All of the calls have been wrapped and represented as native Python method -calls, like :meth:`WebexTeamsAPI.people.me() ` which gets the person details +calls, like :meth:`WebexAPI.people.me() ` which gets the person details for the authenticated user (the user who's access token you are using) - see the `https://api.ciscospark.com/v1/people/me `_ API endpoint @@ -183,7 +183,7 @@ documentation. As you can see, we have represented the API endpoints using simple terms that are aligned with the API docs; for example, representing the ``people/me`` API endpoint as a ``people.me()`` method available underneath the -:class:`WebexTeamsAPI` connection object. +:class:`WebexAPI` connection object. A full list of the available API methods, with their descriptions and parameters, is available in the :ref:`User API Doc`, and a brief summary of the @@ -194,7 +194,7 @@ structure is provided here. You can easily access and call any of these methods directly from your -:class:`WebexTeamsAPI` connection object: +:class:`WebexAPI` connection object: .. code-block:: python @@ -208,30 +208,30 @@ Catching Exceptions If something should go wrong with the API call, an exception will be raised. :exc:`ApiError` exceptions are raised when an error condition is -returned from the Webex Teams cloud. Details will be provided in the error +returned from the Webex cloud. Details will be provided in the error message. .. code-block:: python - >>> from webexteamssdk import WebexTeamsAPI, ApiError - >>> api = WebexTeamsAPI() - >>> room = api.rooms.create("webexteamssdk Test Room") + >>> from webexpythonsdk import WebexAPI, ApiError + >>> api = WebexAPI() + >>> room = api.rooms.create("webexpythonsdk Test Room") >>> me = api.people.me() >>> api.memberships.create(roomId=room.id, personId=me.id) Traceback (most recent call last): File "", line 1, in - File "webexteamssdk/api/memberships.py", line 212, in create + File "webexpythonsdk/api/memberships.py", line 212, in create json_obj = self._session.post('memberships', json=post_data) - File "webexteamssdk/restsession.py", line 187, in post + File "webexpythonsdk/restsession.py", line 187, in post check_response_code(response, erc) - File "webexteamssdk/utils.py", line 104, in check_response_code + File "webexpythonsdk/utils.py", line 104, in check_response_code response=response) - webexteamssdk.exceptions.ApiError: Response Code [409] - The request + webexpythonsdk.exceptions.ApiError: Response Code [409] - The request could not be processed because it conflicts with some established rule of the system. For example, a person may not be added to a room more than once. -You can catch any errors returned by the Webex Teams cloud by catching +You can catch any errors returned by the Webex cloud by catching :exc:`ApiError` exceptions in a try-except block. .. code-block:: python @@ -251,7 +251,7 @@ You can catch any errors returned by the Webex Teams cloud by catching Doh! I forgot that I am automatically added to a room when I create it. >>> -webexteamssdk will also raise a number of other standard errors +webexpythonsdk will also raise a number of other standard errors (:exc:`TypeError`, :exc:`ValueError`, etc.); however, these errors are usually caused by incorrect use of the package or methods and should be sorted while debugging your app. @@ -260,7 +260,7 @@ debugging your app. Working with Returned Objects ----------------------------- -The Webex Teams cloud returns data objects in JSON format, like so: +The Webex cloud returns data objects in JSON format, like so: .. code-block:: json @@ -279,7 +279,7 @@ The Webex Teams cloud returns data objects in JSON format, like so: Sure, JSON data objects can easily be parsed and represented in Python using dictionaries, but when working with an 'object' wouldn't it be nice to be able to work with it like an object - using native object syntax (like accessing -attributes using '.' notation)? webexteamssdk enables you to do just that: +attributes using '.' notation)? webexpythonsdk enables you to do just that: .. code-block:: python @@ -289,7 +289,7 @@ attributes using '.' notation)? webexteamssdk enables you to do just that: >>> me.displayName u'Chris Lunsford' -Representing and treating Webex Teams data objects as Python data objects, can really +Representing and treating Webex data objects as Python data objects, can really help clean up your code and make coding easier: 1. You don't need to create variables to hold the data attributes, just @@ -317,8 +317,8 @@ help clean up your code and make coding easier: This speeds up coding and reduces typo coding errors. 3. When accessing 'optional' attributes, like the ``teamId`` attribute of - a Webex Teams Room object (only present when the room is part of a Webex Teams - Team), the :class:`webexteamssdk.Room` object will return ``None`` when + a Webex Room object (only present when the room is part of a Webex + Team), the :class:`webexpythonsdk.Room` object will return ``None`` when the attribute is not present and will return the attribute's value when it is present. This avoids some boiler plate code and/or needless exception handling, when working with optional attributes. @@ -349,18 +349,18 @@ help clean up your code and make coding easier: "Beautiful is better than ugly." "Simple is better than complex." -A full list of the currently modeled :ref:`Webex Teams Data Objects`, with their -attributes, is available :ref:`here ` in the +A full list of the currently modeled :ref:`Webex Data Objects`, with their +attributes, is available :ref:`here ` in the :ref:`User API Doc`. -**What if Webex Teams adds new data attributes?** +**What if Webex adds new data attributes?** Attribute access WILL WORK for the newly added attributes (yes, without a -package update!), but tab-completion WILL NOT. webexteamssdk is written to +package update!), but tab-completion WILL NOT. webexpythonsdk is written to automatically take advantage of new attributes and data as they are returned; however, tab-completion (which relies on source code and introspection) will -not work until we update the webexteamssdk package (which is easy to do; raise +not work until we update the webexpythonsdk package (which is easy to do; raise the issue on the issues_ page and bug us to add it). @@ -370,18 +370,18 @@ Working with Returned 'Lists' of Objects **Challenge** -When you ask Webex Teams for a list of items (like all of the rooms that you are a -member of or all of the messages in a room), Webex Teams needs to return these items +When you ask Webex for a list of items (like all of the rooms that you are a +member of or all of the messages in a room), Webex needs to return these items to you in an efficient way. Sending all of the messages in a room in one transaction or request isn't really feasible (imaging if the room had existed for years!). Additionally, what if you found what you were looking for in the first few (most recent) messages? Sending all of the items would have been a waste of time and resources. -To facilitate efficient transactions when requesting lists of items, the Webex Teams +To facilitate efficient transactions when requesting lists of items, the Webex APIs implement RFC5988 (Web Linking) to efficiently send 'pages' of responses -(see Pagination_ on the Webex Teams for Developers site). When you make a request to -an Webex Teams API that leverages pagination, Webex Teams returns the first 'page' of +(see Pagination_ on the Webex for Developers site). When you make a request to +an Webex API that leverages pagination, Webex returns the first 'page' of results and a link to the 'next page' of results. If information you need isn't contained the first page, you can request the next and so forth. @@ -390,7 +390,7 @@ isn't contained the first page, you can request the next and so forth. Python has a similar construct as well - iterable_ objects. Iterable objects return their members one at a time, until they have all been returned. -webexteamssdk marries these two concepts (pagination and iterables) to create a +webexpythonsdk marries these two concepts (pagination and iterables) to create a simple interface for working with sequences of returned objects. .. code-block:: python @@ -400,18 +400,18 @@ simple interface for working with sequences of returned objects. >>> # Which can easily be iterated to find what you are looking for >>> for room in rooms: - ... if 'webexteamssdk' in room.title: + ... if 'webexpythonsdk' in room.title: ... demo_room = room ... break >>> demo_room - Room({"title": "webexteamssdk Test Room", "created": "2016-11-12T03:24:39.278Z", "isLocked": false, "lastActivity": "2016-11-12T03:24:39.308Z", "creatorId": "Y2lzY29zcGFyazovL3VzL1BFT1BMRS9mZjhlZTZmYi1hZmVmLTRhNGQtOTJiMS1kNmIyMTZiNTg5NDk", "type": "group", "id": "Y2lzY29zcGFyazovL3VzL1JPT00vOGI1MTIwZTAtYTg4Ny0xMWU2LWFhZjUtZTlmYWEzMWQ1ZmRm"}) + Room({"title": "webexpythonsdk Test Room", "created": "2016-11-12T03:24:39.278Z", "isLocked": false, "lastActivity": "2016-11-12T03:24:39.308Z", "creatorId": "Y2lzY29zcGFyazovL3VzL1BFT1BMRS9mZjhlZTZmYi1hZmVmLTRhNGQtOTJiMS1kNmIyMTZiNTg5NDk", "type": "group", "id": "Y2lzY29zcGFyazovL3VzL1JPT00vOGI1MTIwZTAtYTg4Ny0xMWU2LWFhZjUtZTlmYWEzMWQ1ZmRm"}) -webexteamssdk provides this functionality by returning +webexpythonsdk provides this functionality by returning :class:`GeneratorContainer` objects for API calls that return lists of items. In short, :class:`GeneratorContainer` s are iterable objects that incrementally -yield 'the next object' returned from your Webex Teams API query request until all +yield 'the next object' returned from your Webex API query request until all items have been returned, and they are reusable. If you create an ``rooms`` :class:`GeneratorContainer`, like we did above with ``rooms = api.rooms.list()``, you can use that object to iterate through the @@ -419,15 +419,15 @@ rooms not just once but many times. **Note:** Every time you iterate a :class:`GeneratorContainer` object, fresh API calls are made so you are always working with 'live data' from the Cisco -Webex Teams Cloud. +Webex Cloud. -webexteamssdk *automatically handles the pagination for you* so that you don't +webexpythonsdk *automatically handles the pagination for you* so that you don't have to think about it or write the boiler plate code to handle requesting -pages of responses. webexteamssdk automatically and efficiently requests -additional pages from Webex Teams as needed to yield the items you have requested. +pages of responses. webexpythonsdk automatically and efficiently requests +additional pages from Webex as needed to yield the items you have requested. A :class:`GeneratorContainer` records all of the parameters of your API call, -and uses them to request data from Webex Teams each time you iterate the container. +and uses them to request data from Webex each time you iterate the container. .. code-block:: python @@ -472,9 +472,9 @@ contain all of the returned objects. Extending the API with bound methods ------------------------------------ -As the Webex Teams API is developed and features are added, it may be necessary to extend the webexteamssdk to access those features. -Extending the API is simple by binding your own methods to the WebexTeamsAPI connection object. By binding a method, you can -extend functionality and leverage all of the objects and quality of life features of webexteamssdk. +As the Webex API is developed and features are added, it may be necessary to extend the webexpythonsdk to access those features. +Extending the API is simple by binding your own methods to the WebexAPI connection object. By binding a method, you can +extend functionality and leverage all of the objects and quality of life features of webexpythonsdk. .. code-block:: python @@ -482,18 +482,18 @@ extend functionality and leverage all of the objects and quality of life feature ... json_obj = self._session.get('/example/action/' + param) ... return json_obj - >>> api = WebexTeamsAPI() + >>> api = WebexAPI() >>> api.new_method = new_method - >>> output = WebexTeamsAPI.new_method(param) + >>> output = WebexAPI.new_method(param) *Copyright (c) 2016-2024 Cisco and/or its affiliates.* -.. _Webex Teams: https://www.webex.com/products/teams/index.html +.. _Webex: https://www.webex.com/products/teams/index.html .. _developer.webex.com: https://developer.webex.com/ .. _PyCharm: https://www.jetbrains.com/pycharm/ .. _PEP 20: https://www.python.org/dev/peps/pep-0020/ -.. _issues: https://github.com/CiscoDevNet/webexteamssdk/issues +.. _issues: https://github.com/WebexCommunity/WebexPythonSDK/issues .. _Pagination: https://developer.webex.com/pagination.html .. _iterable: https://docs.python.org/2/glossary.html#term-iterable diff --git a/examples/bot-example-flask.py b/examples/bot-example-flask.py index aa35fc7..0398c4a 100755 --- a/examples/bot-example-flask.py +++ b/examples/bot-example-flask.py @@ -9,15 +9,15 @@ ngrok (https://ngrok.com/) can be used to tunnel traffic back to your server if your machine sits behind a firewall. -You must create a Webex Teams webhook that points to the URL where this script -is hosted. You can do this via the WebexTeamsAPI.webhooks.create() method. +You must create a Webex webhook that points to the URL where this script +is hosted. You can do this via the WebexAPI.webhooks.create() method. -Additional Webex Teams webhook details can be found here: +Additional Webex webhook details can be found here: https://developer.webex.com/webhooks-explained.html A bot must be created and pointed to this server in the My Apps section of https://developer.webex.com. The bot's Access Token should be added as a -'WEBEX_TEAMS_ACCESS_TOKEN' environment variable on the web server hosting this +'WEBEX_ACCESS_TOKEN' environment variable on the web server hosting this script. This script supports Python versions 2 and 3. @@ -63,7 +63,7 @@ from flask import Flask, request import requests -from webexteamssdk import WebexTeamsAPI, Webhook +from webexpythonsdk import WebexAPI, Webhook # Module constants @@ -73,8 +73,8 @@ # Initialize the environment # Create the web application instance flask_app = Flask(__name__) -# Create the Webex Teams API connection object -api = WebexTeamsAPI() +# Create the Webex API connection object +api = WebexAPI() # Helper functions @@ -92,7 +92,7 @@ def get_catfact(): # Core bot functionality -# Your Webex Teams webhook should point to http://:5000/events +# Your Webex webhook should point to http://:5000/events @flask_app.route("/events", methods=["GET", "POST"]) def webex_teams_webhook_events(): """Processes incoming requests to the '/events' URI.""" @@ -101,7 +101,7 @@ def webex_teams_webhook_events(): - Webex Teams Bot served via Flask + Webex Bot served via Flask

@@ -115,9 +115,9 @@ def webex_teams_webhook_events(): """.format(get_catfact()) elif request.method == "POST": - """Respond to inbound webhook JSON HTTP POST from Webex Teams.""" + """Respond to inbound webhook JSON HTTP POST from Webex.""" - # Get the POST data sent from Webex Teams + # Get the POST data sent from Webex json_data = request.json print("\n") print("WEBHOOK POST RECEIVED:") diff --git a/examples/bot-example-webpy.py b/examples/bot-example-webpy.py index 550a481..29b1590 100755 --- a/examples/bot-example-webpy.py +++ b/examples/bot-example-webpy.py @@ -7,15 +7,15 @@ launching the script if desired. ngrok can be used to tunnel traffic back to your server if you don't wish to expose your machine publicly to the Internet. -You must create a Webex Teams webhook that points to the URL where this script -is hosted. You can do this via the WebexTeamsAPI.webhooks.create() method. +You must create a Webex webhook that points to the URL where this script +is hosted. You can do this via the WebexAPI.webhooks.create() method. -Additional Webex Teams webhook details can be found here: +Additional Webex webhook details can be found here: https://developer.webex.com/webhooks-explained.html A bot must be created and pointed to this server in the My Apps section of https://developer.webex.com. The bot's Access Token should be added as a -'WEBEX_TEAMS_ACCESS_TOKEN' environment variable on the web server hosting this +'WEBEX_ACCESS_TOKEN' environment variable on the web server hosting this script. NOTE: While this script is written to support Python versions 2 and 3, as of @@ -63,7 +63,7 @@ import web import requests -from webexteamssdk import WebexTeamsAPI, Webhook +from webexpythonsdk import WebexAPI, Webhook # Module constants @@ -71,12 +71,12 @@ # Global variables -# Your Webex Teams webhook should point to http://:8080/events +# Your Webex webhook should point to http://:8080/events urls = ("/events", "webhook") # Create the web application instance app = web.application(urls, globals()) -# Create the Webex Teams API connection object -api = WebexTeamsAPI() +# Create the Webex API connection object +api = WebexAPI() def get_catfact(): @@ -94,8 +94,8 @@ def get_catfact(): class webhook(object): def POST(self): - """Respond to inbound webhook JSON HTTP POSTs from Webex Teams.""" - # Get the POST data sent from Webex Teams + """Respond to inbound webhook JSON HTTP POSTs from Webex.""" + # Get the POST data sent from Webex json_data = web.data() print("\nWEBHOOK POST RECEIVED:") print(json_data, "\n") diff --git a/examples/bot-with-card-example-flask.py b/examples/bot-with-card-example-flask.py index f8149b5..82f6238 100755 --- a/examples/bot-with-card-example-flask.py +++ b/examples/bot-with-card-example-flask.py @@ -5,7 +5,7 @@ A bot must be created and pointed to this server in the My Apps section of https://developer.webex.com. The bot's Access Token should be added as a -"WEBEX_TEAMS_ACCESS_TOKEN" environment variable on the web server hosting this +"WEBEX_ACCESS_TOKEN" environment variable on the web server hosting this script. This script must expose a public IP address in order to receive notifications @@ -14,7 +14,7 @@ The following environment variables are needed for this to run -* WEBEX_TEAMS_ACCESS_TOKEN -- Access token for a Webex bot +* WEBEX_ACCESS_TOKEN -- Access token for a Webex bot * WEBHOOK_URL -- URL for Webex Webhooks (ie: https://2fXX9c.ngrok.io) * PORT - Port for Webhook URL (ie: the port param passed to ngrok) @@ -58,7 +58,7 @@ from flask import Flask, request -from webexteamssdk import WebexTeamsAPI, Webhook +from webexpythonsdk import WebexAPI, Webhook # Script metadata @@ -161,13 +161,13 @@ # Module variables webhook_url = os.environ.get("WEBHOOK_URL", "") port = int(os.environ.get("PORT", 0)) -access_token = os.environ.get("WEBEX_TEAMS_ACCESS_TOKEN", "") +access_token = os.environ.get("WEBEX_ACCESS_TOKEN", "") if not all((webhook_url, port, access_token)): print( """Missing required environment variable. You must set: * WEBHOOK_URL -- URL for Webex Webhooks (ie: https://2fXX9c.ngrok.io) * PORT - Port for Webhook URL (ie: the port param passed to ngrok) - * WEBEX_TEAMS_ACCESS_TOKEN -- Access token for a Webex bot + * WEBEX_ACCESS_TOKEN -- Access token for a Webex bot """ ) sys.exit() @@ -175,8 +175,8 @@ # Initialize the environment # Create the web application instance flask_app = Flask(__name__) -# Create the Webex Teams API connection object -api = WebexTeamsAPI() +# Create the Webex API connection object +api = WebexAPI() # Get the details for the account who's access token we are using me = api.people.me() @@ -191,7 +191,7 @@ def delete_webhooks_with_name(): def create_webhooks(webhook_url): - """Create the Webex Teams webhooks we need for our bot.""" + """Create the Webex webhooks we need for our bot.""" print("Creating Message Created Webhook...") webhook = api.webhooks.create( resource=MESSAGE_WEBHOOK_RESOURCE, @@ -281,10 +281,10 @@ def respond_to_message(webhook): # Core bot functionality # Webex will post to this server when a message is created for the bot # or when a user clicks on an Action.Submit button in a card posted by this bot -# Your Webex Teams webhook should point to http://:/events +# Your Webex webhook should point to http://:/events @flask_app.route("/events", methods=["POST"]) def webex_teams_webhook_events(): - """Respond to inbound webhook JSON HTTP POST from Webex Teams.""" + """Respond to inbound webhook JSON HTTP POST from Webex.""" # Create a Webhook object from the JSON data webhook_obj = Webhook(request.json) diff --git a/examples/local_file_upload.py b/examples/local_file_upload.py index bdf3441..3aaaaa6 100755 --- a/examples/local_file_upload.py +++ b/examples/local_file_upload.py @@ -3,17 +3,17 @@ """Demo script showing how to upload a local file. A simple script showing how to upload a local file when creating a message in -a Webex Teams space. +a Webex space. You upload a file by using the `files=` parameter of the -`WebexTeamsAPI.messages.create()` method, which expects to receive a list +`WebexAPI.messages.create()` method, which expects to receive a list containing a single string with the path to file to be attached to the created message (Example: `files=["./image.png"]`). The files parameter receives a list to allow for future expansion; however today, only one file may be -included when creating a message via the Webex Teams APIs. +included when creating a message via the Webex APIs. -The WebexTeamsSDK natively retrieves your Webex Teams access token from the -WEBEX_TEAMS_ACCESS_TOKEN environment variable. You must have this environment +The WebexPythonSDK natively retrieves your Webex access token from the +WEBEX_ACCESS_TOKEN environment variable. You must have this environment variable set to run this script. @@ -42,7 +42,7 @@ import os -from webexteamssdk import WebexTeamsAPI +from webexpythonsdk import WebexAPI __author__ = "Jeff Levensailor" @@ -56,8 +56,8 @@ FILE_PATH = "" -# Create a WebexTeamsAPI connection object; uses your WEBEX_TEAMS_ACCESS_TOKEN -api = WebexTeamsAPI() +# Create a WebexAPI connection object; uses your WEBEX_ACCESS_TOKEN +api = WebexAPI() # Let's make sure the file exists diff --git a/examples/ngrokwebhook.py b/examples/ngrokwebhook.py index 71a4277..e724d20 100755 --- a/examples/ngrokwebhook.py +++ b/examples/ngrokwebhook.py @@ -3,7 +3,7 @@ """Sample script to read local ngrok info and create a corresponding webhook. Sample script that reads ngrok info from the local ngrok client api and creates -a Webex Teams Webhook pointint to the ngrok tunnel's public HTTP URL. +a Webex Webhook pointint to the ngrok tunnel's public HTTP URL. Typically ngrok is called run with the following syntax to redirect an Internet accesible ngrok url to localhost port 8080: @@ -11,7 +11,7 @@ $ ngrok http 8080 To use script simply launch ngrok, and then launch this script. After ngrok is -killed, run this script a second time to remove webhook from Webex Teams. +killed, run this script a second time to remove webhook from Webex. Copyright (c) 2016-2024 Cisco and/or its affiliates. @@ -53,7 +53,7 @@ import sys -from webexteamssdk import WebexTeamsAPI +from webexpythonsdk import WebexAPI import requests @@ -104,7 +104,7 @@ def delete_webhooks_with_name(api, name): def create_ngrok_webhook(api, ngrok_public_url): - """Create a Webex Teams webhook pointing to the public ngrok URL.""" + """Create a Webex webhook pointing to the public ngrok URL.""" print("Creating Webhook...") webhook = api.webhooks.create( name=WEBHOOK_NAME, @@ -119,7 +119,7 @@ def create_ngrok_webhook(api, ngrok_public_url): def main(): """Delete previous webhooks. If local ngrok tunnel, create a webhook.""" - api = WebexTeamsAPI() + api = WebexAPI() delete_webhooks_with_name(api, name=WEBHOOK_NAME) public_url = get_ngrok_public_url() if public_url is not None: diff --git a/examples/oauth-flask-ngrok.py b/examples/oauth-flask-ngrok.py index 903d7de..d47affb 100644 --- a/examples/oauth-flask-ngrok.py +++ b/examples/oauth-flask-ngrok.py @@ -42,7 +42,7 @@ from uuid import uuid4 import requests -from webexteamssdk import WebexTeamsAPI +from webexpythonsdk import WebexAPI # Parameters configured in Webex Integration OAUTH_CLIENT_ID = "your integration Client ID" @@ -149,7 +149,7 @@ def callback(): # will exchange the OAuth authorization code to an access token behind the # scenes. It is the easiest, but the drawback is the refresh token is lost # and cannot be saved. - api = WebexTeamsAPI( + api = WebexAPI( client_id=OAUTH_CLIENT_ID, client_secret=OAUTH_CLIENT_SECRET, oauth_code=oauth_code, @@ -164,7 +164,7 @@ def callback(): # access token is valid for 14 days. The refresh token may be saved # somewhere and later used to refresh the access token with # access_tokens.refresh() - # api = WebexTeamsAPI("any string") + # api = WebexAPI("any string") # access_tokens = api.access_tokens.get( # client_id=OAUTH_CLIENT_ID, # client_secret=OAUTH_CLIENT_SECRET, diff --git a/examples/people.py b/examples/people.py index 6abb0b0..b8626d3 100755 --- a/examples/people.py +++ b/examples/people.py @@ -1,9 +1,9 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- -"""Script to demonstrate the use of webexteamssdk for the people API +"""Script to demonstrate the use of webexpythonsdk for the people API -The package natively retrieves your Webex Teams access token from the -WEBEX_TEAMS_ACCESS_TOKEN environment variable. You must have this environment +The package natively retrieves your Webex access token from the +WEBEX_ACCESS_TOKEN environment variable. You must have this environment variable set to run this script. Copyright (c) 2016-2024 Cisco and/or its affiliates. @@ -42,12 +42,12 @@ __copyright__ = "Copyright (c) 2016-2024 Cisco and/or its affiliates." __license__ = "MIT" -from webexteamssdk import WebexTeamsAPI +from webexpythonsdk import WebexAPI -# Create a WebexTeamsAPI connection object; uses your WEBEX_TEAMS_ACCESS_TOKEN +# Create a WebexAPI connection object; uses your WEBEX_ACCESS_TOKEN # environment variable -api = WebexTeamsAPI() +api = WebexAPI() # Get my user information diff --git a/examples/pyramidWebexTeamsBot/README.rst b/examples/pyramidWebexTeamsBot/README.rst index 5d134ae..eee059d 100755 --- a/examples/pyramidWebexTeamsBot/README.rst +++ b/examples/pyramidWebexTeamsBot/README.rst @@ -6,20 +6,20 @@ A simple bot script, built on Pyramid using Cornice. This sample script leverages the Pyramid web framework https://trypyramid.com/ with Cornice https://cornice.readthedocs.io. By default the web server will be reachable at port 6543 you can change this default if desired -(see `pyramidWebexTeamsBot.ini`). +(see `pyramidWebexBot.ini`). ngrok (https://ngrok.com/) can be used to tunnel traffic back to your server if your machine sits behind a firewall. -You must create a Webex Teams webhook that points to the URL where this script is -hosted. You can do this via the WebexTeamsAPI.webhooks.create() method. +You must create a Webex webhook that points to the URL where this script is +hosted. You can do this via the WebexAPI.webhooks.create() method. -Additional Webex Teams webhook details can be found here: +Additional Webex webhook details can be found here: https://developer.webex.com/webhooks-explained.html A bot must be created and pointed to this server in the My Apps section of https://developer.webex.com. The bot's Access Token should be added as a -'WEBEX_TEAMS_ACCESS_TOKEN' environment variable on the web server hosting this +'WEBEX_ACCESS_TOKEN' environment variable on the web server hosting this script. This script supports Python versions 2 and 3. @@ -30,4 +30,4 @@ Running the bot In order to execute the bot, you need to ``python setup.py develop`` -``pserve --reload pyramidWebexTeamsBot`` +``pserve --reload pyramidWebexBot`` diff --git a/examples/pyramidWebexTeamsBot/pyramidWebexTeamsBot.ini b/examples/pyramidWebexTeamsBot/pyramidWebexTeamsBot.ini index d099cbc..e3a24a6 100755 --- a/examples/pyramidWebexTeamsBot/pyramidWebexTeamsBot.ini +++ b/examples/pyramidWebexTeamsBot/pyramidWebexTeamsBot.ini @@ -1,5 +1,5 @@ [app:main] -use = egg:pyramidWebexTeamsBot +use = egg:pyramidWebexBot pyramid.reload_templates = true pyramid.debug_authorization = false @@ -16,7 +16,7 @@ port = 6543 # Begin logging configuration [loggers] -keys = root, pyramidWebexTeamsBot +keys = root, pyramidWebexBot [handlers] keys = console @@ -28,10 +28,10 @@ keys = generic level = INFO handlers = console -[logger_pyramidWebexTeamsBot] +[logger_pyramidWebexBot] level = DEBUG handlers = -qualname = pyramidWebexTeamsBot +qualname = pyramidWebexBot [handler_console] class = StreamHandler diff --git a/examples/pyramidWebexTeamsBot/pyramidWebexTeamsBot/__init__.py b/examples/pyramidWebexTeamsBot/pyramidWebexTeamsBot/__init__.py index cc0557f..9be7cb0 100755 --- a/examples/pyramidWebexTeamsBot/pyramidWebexTeamsBot/__init__.py +++ b/examples/pyramidWebexTeamsBot/pyramidWebexTeamsBot/__init__.py @@ -35,5 +35,5 @@ def main(global_config, **settings): config = Configurator(settings=settings) config.include("cornice") - config.scan("pyramidWebexTeamsBot.views") + config.scan("pyramidWebexBot.views") return config.make_wsgi_app() diff --git a/examples/pyramidWebexTeamsBot/pyramidWebexTeamsBot/views.py b/examples/pyramidWebexTeamsBot/pyramidWebexTeamsBot/views.py index 8069b3d..ff929e4 100755 --- a/examples/pyramidWebexTeamsBot/pyramidWebexTeamsBot/views.py +++ b/examples/pyramidWebexTeamsBot/pyramidWebexTeamsBot/views.py @@ -4,20 +4,20 @@ This sample script leverages the Pyramid web framework https://trypyramid.com/ with Cornice https://cornice.readthedocs.io. By default the web server will be reachable at port 6543 you can change this default if desired -(see `pyramidWebexTeamsBot.ini`). +(see `pyramidWebexBot.ini`). ngrok (https://ngrok.com/) can be used to tunnel traffic back to your server if your machine sits behind a firewall. -You must create a Webex Teams webhook that points to the URL where this script -is hosted. You can do this via the WebexTeamsAPI.webhooks.create() method. +You must create a Webex webhook that points to the URL where this script +is hosted. You can do this via the WebexAPI.webhooks.create() method. -Additional Webex Teams webhook details can be found here: +Additional Webex webhook details can be found here: https://developer.webex.com/webhooks-explained.html A bot must be created and pointed to this server in the My Apps section of https://developer.webex.com. The bot's Access Token should be added as a -'WEBEX_TEAMS_ACCESS_TOKEN' environment variable on the web server hosting this +'WEBEX_ACCESS_TOKEN' environment variable on the web server hosting this script. This script supports Python versions 2 and 3. @@ -63,8 +63,8 @@ __license__ = "MIT" -from webexteamssdk import Webhook -from webexteamssdk.api import WebexTeamsAPI +from webexpythonsdk import Webhook +from webexpythonsdk.api import WebexAPI from cornice import Service import requests @@ -79,8 +79,8 @@ # Initialize the environment -# Create the Webex Teams API connection object -api = WebexTeamsAPI() +# Create the Webex API connection object +api = WebexAPI() # Helper functions @@ -100,7 +100,7 @@ def get_catfact(): events_service = Service( name="events", path="/events", - description="Webex Teams Webhook", + description="Webex Webhook", ) @@ -110,12 +110,12 @@ def get_events_service(request): return {"fact": get_catfact()} -# Your Webex Teams webhook should point to http://:6543/events +# Your Webex webhook should point to http://:6543/events @events_service.post() def post_events_service(request): - """Respond to inbound webhook JSON HTTP POST from Webex Teams.""" + """Respond to inbound webhook JSON HTTP POST from Webex.""" - # Get the POST data sent from Webex Teams + # Get the POST data sent from Webex json_data = request.json log.info("\n") log.info("WEBHOOK POST RECEIVED:") diff --git a/examples/pyramidWebexTeamsBot/setup.py b/examples/pyramidWebexTeamsBot/setup.py index 97b92a4..1f99d24 100755 --- a/examples/pyramidWebexTeamsBot/setup.py +++ b/examples/pyramidWebexTeamsBot/setup.py @@ -39,9 +39,9 @@ setup( - name="pyramidWebexTeamsBot", + name="pyramidWebexBot", version=0.1, - description="Pyramid Webex Teams Bot application", + description="Pyramid Webex Bot application", long_description=README, classifiers=[ "Programming Language :: Python", @@ -55,9 +55,9 @@ packages=find_packages(), include_package_data=True, zip_safe=False, - install_requires=["cornice", "waitress", "webexteamssdk"], + install_requires=["cornice", "waitress", "webexpythonsdk"], entry_points="""[paste.app_factory] - main=pyramidWebexTeamsBot:main + main=pyramidWebexBot:main """, paster_plugins=["pyramid"], ) diff --git a/examples/simple.py b/examples/simple.py index c27e6c1..33c7a1a 100755 --- a/examples/simple.py +++ b/examples/simple.py @@ -1,13 +1,13 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- -"""Simple webexteamssdk demonstration script. +"""Simple webexpythonsdk demonstration script. Very simple script to create a demo room, post a message, and post a file. If one or more rooms with the name of the demo room already exist, it will delete the previously existing rooms. -The package natively retrieves your Webex Teams access token from the -WEBEX_TEAMS_ACCESS_TOKEN environment variable. You must have this environment +The package natively retrieves your Webex access token from the +WEBEX_ACCESS_TOKEN environment variable. You must have this environment variable set to run this script. @@ -33,19 +33,19 @@ """ from __future__ import print_function -from webexteamssdk import WebexTeamsAPI +from webexpythonsdk import WebexAPI -DEMO_ROOM_NAME = "webexteamssdk Demo Room" +DEMO_ROOM_NAME = "webexpythonsdk Demo Room" DEMO_PEOPLE = ["test01@cmlccie.com", "test02@cmlccie.com"] -DEMO_MESSAGE = "Webex Teams rocks! \ud83d\ude0e" +DEMO_MESSAGE = "Webex rocks! \ud83d\ude0e" DEMO_FILE_URL = ( "https://www.webex.com/content/dam/wbx/us/images/dg-integ/teams_icon.png" ) -# Create a WebexTeamsAPI connection object; uses your WEBEX_TEAMS_ACCESS_TOKEN -api = WebexTeamsAPI() +# Create a WebexAPI connection object; uses your WEBEX_ACCESS_TOKEN +api = WebexAPI() # Clean up previous demo rooms diff --git a/generator/generate.py b/generator/generate.py index 3c0da23..aa41b8f 100644 --- a/generator/generate.py +++ b/generator/generate.py @@ -14,7 +14,7 @@ def render_prop_mixin( properties: list, base_name: str, template_name: str = "mixins.py", - path_prefix: str = "../webexteamssdk/models/mixins/", + path_prefix: str = "../webexpythonsdk/models/mixins/", ) -> str: """Renders a simple property mixin for the SDK based on the information provided in the descriptor file. @@ -30,7 +30,7 @@ def render_prop_mixin( the filenames. template_name(str): Name of the template to use. Default: mixins.py path_prefix(str): Path to the mixins folder. - Default: ../webexteamssdk/models/mixins/ + Default: ../webexpythonsdk/models/mixins/ Returns: str: Path to the generated @@ -53,7 +53,7 @@ def render_api_class( descr: dict, base_name: str, template_name: str = "api.py", - path_prefix: str = "../webexteamssdk/api/", + path_prefix: str = "../webexpythonsdk/api/", ) -> str: """Renders an API class based on the properties described in the descr file. @@ -67,7 +67,7 @@ def render_api_class( the filenames. template_name(str): Name of the template to use. Default: api.py path_prefix(str): Path to the target api folder that the output will - we placed in. Default: ../webexteamssdk/api/ + we placed in. Default: ../webexpythonsdk/api/ Returns: str: The path to the generated api class diff --git a/generator/models/meeting_invitees.yaml b/generator/models/meeting_invitees.yaml index 2a0df8a..c90348f 100644 --- a/generator/models/meeting_invitees.yaml +++ b/generator/models/meeting_invitees.yaml @@ -83,19 +83,19 @@ additional_code: > properties. **request_parameters: Additional request parameters (provides support for parameters that may be added in the future). - + Returns: GeneratorContainer: A GeneratorContainer which, when iterated, yields the meetingInvitees returned by the Webex query. Raises: TypeError: If the parameter types are incorrect. - ApiError: If the Webex Teams cloud returns an error. + ApiError: If the Webex cloud returns an error. """ check_type(meetingId, basestring) check_type(hostEmail, basestring, optional=True) check_type(items, list, optional=True) - + post_data = dict_from_items_with_values( request_parameters, meetingId=meetingId, @@ -110,6 +110,3 @@ additional_code: > # Return an object created from the response JSON data for itm in json_data['items']: yield self._object_factory(OBJECT_TYPE, itm) - - - \ No newline at end of file diff --git a/generator/templates/api.py b/generator/templates/api.py index 55dd27b..9f7c809 100644 --- a/generator/templates/api.py +++ b/generator/templates/api.py @@ -59,7 +59,7 @@ def __init__(self, session, object_factory): Args: session(RestSession): The RESTful session object to be used for - API calls to the Webex Teams service. + API calls to the Webex service. Raises: TypeError: If the parameter types are incorrect. @@ -86,7 +86,7 @@ def list(self, {% for up in url_parameters -%} Use query parameters to filter the response. - This method supports Webex Teams's implementation of RFC5988 Web + This method supports Webex's implementation of RFC5988 Web Linking to provide pagination support. It returns a generator container that incrementally yields all memberships returned by the query. The generator will automatically request additional 'pages' of @@ -113,7 +113,7 @@ def list(self, {% for up in url_parameters -%} Raises: TypeError: If the parameter types are incorrect. - ApiError: If the Webex Teams cloud returns an error. + ApiError: If the Webex cloud returns an error. """ {% for up in url_parameters -%} @@ -187,7 +187,7 @@ def create(self, {% for up in url_parameters -%} Raises: TypeError: If the parameter types are incorrect. - ApiError: If the Webex Teams cloud returns an error. + ApiError: If the Webex cloud returns an error. """ {% for up in url_parameters -%} @@ -242,7 +242,7 @@ def get(self, {% for up in url_parameters %}{{up['name']}}, {% endfor %}{{ objec Raises: TypeError: If the parameter types are incorrect. - ApiError: If the Webex Teams cloud returns an error. + ApiError: If the Webex cloud returns an error. """ check_type({{ object_type }}Id, basestring) @@ -271,7 +271,7 @@ def delete(self, {% for up in url_parameters %}{{up['name']}}, {% endfor %}{{ ob Raises: TypeError: If the parameter types are incorrect. - ApiError: If the Webex Teams cloud returns an error. + ApiError: If the Webex cloud returns an error. """ {% for up in url_parameters -%} diff --git a/script/ipython_console.py b/script/ipython_console.py index ac1ea8c..743e88d 100755 --- a/script/ipython_console.py +++ b/script/ipython_console.py @@ -13,10 +13,10 @@ from builtins import * -import webexteamssdk +import webexpythonsdk __copyright__ = "Copyright (c) 2016-2024 Cisco and/or its affiliates." __license__ = "MIT" -api = webexteamssdk.WebexTeamsAPI() +api = webexpythonsdk.WebexAPI() diff --git a/src/webexpythonsdk/__init__.py b/src/webexpythonsdk/__init__.py index 3806fa0..ae95ead 100644 --- a/src/webexpythonsdk/__init__.py +++ b/src/webexpythonsdk/__init__.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -"""Community-developed Python SDK for the Webex Teams APIs. +"""Community-developed Python SDK for the Webex APIs. Copyright (c) 2016-2024 Cisco and/or its affiliates. @@ -31,7 +31,7 @@ import logging -import webexteamssdk.models.cards as cards +import webexpythonsdk.models.cards as cards from ._metadata import ( __author__, __author_email__, @@ -43,7 +43,7 @@ __url__, __version__, ) -from .api import WebexTeamsAPI +from .api import WebexAPI from .exceptions import ( AccessTokenError, ApiError, @@ -51,8 +51,8 @@ MalformedResponse, RateLimitError, RateLimitWarning, - webexteamssdkException, - webexteamssdkWarning, + webexpythonsdkException, + webexpythonsdkWarning, ) from .models.dictionary import dict_data_factory from .models.immutable import ( @@ -82,7 +82,7 @@ WebhookEvent, ) from .models.simple import simple_data_factory, SimpleDataModel -from .utils import WebexTeamsDateTime +from .utils import WebexDateTime # Initialize Package Logging diff --git a/src/webexpythonsdk/_metadata.py b/src/webexpythonsdk/_metadata.py index f4ce515..7fbe40d 100644 --- a/src/webexpythonsdk/_metadata.py +++ b/src/webexpythonsdk/_metadata.py @@ -22,10 +22,10 @@ SOFTWARE. """ -__title__ = "webexteamssdk" -__description__ = "Community-developed Python SDK for the Webex Teams APIs" -__url__ = "https://github.com/CiscoDevNet/webexteamssdk" -__download_url__ = "https://pypi.python.org/pypi/webexteamssdk" +__title__ = "webexpythonsdk" +__description__ = "Community-developed Python SDK for the Webex APIs" +__url__ = "https://github.com/WebexCommunity/WebexPythonSDK" +__download_url__ = "https://pypi.python.org/pypi/webexpythonsdk" __author__ = "Chris Lunsford" __author_email__ = "chrlunsf@cisco.com" __copyright__ = "Copyright (c) 2016-2024 Cisco and/or its affiliates." @@ -34,7 +34,7 @@ # Only import the ._version module and compute the version when this module is # imported. -if __name__ == "webexteamssdk._metadata": +if __name__ == "webexpythonsdk._metadata": from ._version import get_versions __version__ = get_versions()["version"] diff --git a/src/webexpythonsdk/_version.py b/src/webexpythonsdk/_version.py index e4a338f..7b3dcba 100644 --- a/src/webexpythonsdk/_version.py +++ b/src/webexpythonsdk/_version.py @@ -42,7 +42,7 @@ def get_config(): cfg.style = "pep440-post" cfg.tag_prefix = "v" cfg.parentdir_prefix = "None" - cfg.versionfile_source = "webexteamssdk/_version.py" + cfg.versionfile_source = "webexpythonsdk/_version.py" cfg.verbose = False return cfg diff --git a/src/webexpythonsdk/api/__init__.py b/src/webexpythonsdk/api/__init__.py index a64e386..f5c8ed7 100644 --- a/src/webexpythonsdk/api/__init__.py +++ b/src/webexpythonsdk/api/__init__.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -"""Webex Teams API wrappers. +"""Webex API wrappers. Copyright (c) 2016-2024 Cisco and/or its affiliates. @@ -24,16 +24,16 @@ from past.types import basestring -from webexteamssdk.config import ( +from webexpythonsdk.config import ( DEFAULT_BASE_URL, DEFAULT_SINGLE_REQUEST_TIMEOUT, DEFAULT_WAIT_ON_RATE_LIMIT, ) -from webexteamssdk.environment import WEBEX_TEAMS_ACCESS_TOKEN -from webexteamssdk.exceptions import AccessTokenError -from webexteamssdk.models.immutable import immutable_data_factory -from webexteamssdk.restsession import RestSession -from webexteamssdk.utils import check_type +from webexpythonsdk.environment import WEBEX_ACCESS_TOKEN +from webexpythonsdk.exceptions import AccessTokenError +from webexpythonsdk.models.immutable import immutable_data_factory +from webexpythonsdk.restsession import RestSession +from webexpythonsdk.utils import check_type from .access_tokens import AccessTokensAPI from .admin_audit_events import AdminAuditEventsAPI from .attachment_actions import AttachmentActionsAPI @@ -59,14 +59,14 @@ import os -class WebexTeamsAPI(object): - """Webex Teams API wrapper. +class WebexAPI(object): + """Webex API wrapper. - Creates a 'session' for all API calls through a created WebexTeamsAPI + Creates a 'session' for all API calls through a created WebexAPI object. The 'session' handles authentication, provides the needed headers, and checks all responses for error conditions. - WebexTeamsAPI wraps all of the individual Webex Teams APIs and represents + WebexAPI wraps all of the individual Webex APIs and represents them in a simple hierarchical structure. """ @@ -86,17 +86,17 @@ def __init__( caller=None, disable_ssl_verify=False, ): - """Create a new WebexTeamsAPI object. + """Create a new WebexAPI object. - An access token must be used when interacting with the Webex Teams API. + An access token must be used when interacting with the Webex API. This package supports three methods for you to provide that access token: 1. You may manually specify the access token via the `access_token` - argument, when creating a new WebexTeamsAPI object. + argument, when creating a new WebexAPI object. 2. If an access_token argument is not supplied, the package checks - for a WEBEX_TEAMS_ACCESS_TOKEN environment variable. + for a WEBEX_ACCESS_TOKEN environment variable. 3. Provide the parameters (client_id, client_secret, oauth_code and oauth_redirect_uri) from your oauth flow. @@ -106,19 +106,19 @@ def __init__( Args: access_token(basestring): The access token to be used for API - calls to the Webex Teams service. Defaults to checking for a - WEBEX_TEAMS_ACCESS_TOKEN environment variable. + calls to the Webex service. Defaults to checking for a + WEBEX_ACCESS_TOKEN environment variable. base_url(basestring): The base URL to be prefixed to the individual API endpoint suffixes. - Defaults to webexteamssdk.DEFAULT_BASE_URL. + Defaults to webexpythonsdk.DEFAULT_BASE_URL. single_request_timeout(int): Timeout (in seconds) for RESTful HTTP requests. Defaults to - webexteamssdk.config.DEFAULT_SINGLE_REQUEST_TIMEOUT. + webexpythonsdk.config.DEFAULT_SINGLE_REQUEST_TIMEOUT. wait_on_rate_limit(bool): Enables or disables automatic rate-limit handling. Defaults to - webexteamssdk.config.DEFAULT_WAIT_ON_RATE_LIMIT. + webexpythonsdk.config.DEFAULT_WAIT_ON_RATE_LIMIT. object_factory(callable): The factory function to use to create - Python objects from the returned Webex Teams JSON data objects. + Python objects from the returned Webex JSON data objects. client_id(basestring): The client id of your integration. Provided upon creation in the portal. client_secret(basestring): The client secret of your integration. @@ -140,7 +140,7 @@ def __init__( session won't verify ssl certs anymore. Returns: - WebexTeamsAPI: A new WebexTeamsAPI object. + WebexAPI: A new WebexAPI object. Raises: TypeError: If the parameter types are incorrect. @@ -161,7 +161,7 @@ def __init__( check_type(caller, basestring, optional=True) check_type(disable_ssl_verify, bool, optional=True) - access_token = access_token or WEBEX_TEAMS_ACCESS_TOKEN + access_token = access_token or WEBEX_ACCESS_TOKEN # Init AccessTokensAPI wrapper early to use for oauth requests self.access_tokens = AccessTokensAPI( @@ -188,14 +188,14 @@ def __init__( # variable, or obtained via an OAuth exchange raise an error. if not access_token: raise AccessTokenError( - "You must provide a Webex Teams access token to interact with " - "the Webex Teams APIs, either via a WEBEX_TEAMS_ACCESS_TOKEN " + "You must provide a Webex access token to interact with " + "the Webex APIs, either via a WEBEX_ACCESS_TOKEN " "environment variable or via the access_token argument." ) # Create the API session - # All of the API calls associated with a WebexTeamsAPI object will - # leverage a single RESTful 'session' connecting to the Webex Teams + # All of the API calls associated with a WebexAPI object will + # leverage a single RESTful 'session' connecting to the Webex # cloud. self._session = RestSession( access_token=access_token, @@ -247,7 +247,7 @@ def __init__( @property def access_token(self): - """The access token used for API calls to the Webex Teams service.""" + """The access token used for API calls to the Webex service.""" return self._session.access_token @property @@ -266,7 +266,7 @@ def wait_on_rate_limit(self): return self._session.wait_on_rate_limit # Create a class attribute for the Access Tokens API that can be accessed - # before WebexTeamsAPI object is initialized. + # before WebexAPI object is initialized. access_tokens = AccessTokensAPI( base_url=DEFAULT_BASE_URL, object_factory=immutable_data_factory, @@ -275,10 +275,10 @@ def wait_on_rate_limit(self): @classmethod def from_oauth_code(cls, client_id, client_secret, code, redirect_uri): - """Create a new WebexTeamsAPI connection object using an OAuth code. + """Create a new WebexAPI connection object using an OAuth code. Exchange an Authorization Code for an Access Token, then use the access - token to create a new WebexTeamsAPI connection object. + token to create a new WebexAPI connection object. Args: client_id(basestring): Provided when you created your integration. @@ -290,12 +290,12 @@ def from_oauth_code(cls, client_id, client_secret, code, redirect_uri): process. Returns: - WebexTeamsAPI: A new WebexTeamsAPI object initialized with the + WebexAPI: A new WebexAPI object initialized with the access token from the OAuth Authentication Code exchange. Raises: TypeError: If the parameter types are incorrect. - ApiError: If the Webex Teams cloud returns an error. + ApiError: If the Webex cloud returns an error. """ token_obj = cls.access_tokens.get( client_id, client_secret, code, redirect_uri @@ -305,10 +305,10 @@ def from_oauth_code(cls, client_id, client_secret, code, redirect_uri): @classmethod def from_oauth_refresh(cls, client_id, client_secret, refresh_token): - """Create a new WebexTeamsAPI connection object using an OAuth refresh. + """Create a new WebexAPI connection object using an OAuth refresh. Exchange a refresh token for an Access Token, then use the access - token to create a new WebexTeamsAPI connection object. + token to create a new WebexAPI connection object. Args: client_id(basestring): Provided when you created your integration. @@ -318,12 +318,12 @@ def from_oauth_refresh(cls, client_id, client_secret, refresh_token): Token. Returns: - WebexTeamsAPI: A new WebexTeamsAPI object initialized with the + WebexAPI: A new WebexAPI object initialized with the access token from the OAuth Refresh Token exchange. Raises: TypeError: If the parameter types are incorrect. - ApiError: If the Webex Teams cloud returns an error. + ApiError: If the Webex cloud returns an error. """ token_obj = cls.access_tokens.refresh( client_id, client_secret, refresh_token diff --git a/src/webexpythonsdk/api/access_tokens.py b/src/webexpythonsdk/api/access_tokens.py index 8354c74..c0f0fcf 100644 --- a/src/webexpythonsdk/api/access_tokens.py +++ b/src/webexpythonsdk/api/access_tokens.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -"""Webex Teams Access-Tokens API wrapper. +"""Webex Access-Tokens API wrapper. Copyright (c) 2016-2024 Cisco and/or its affiliates. @@ -54,9 +54,9 @@ class AccessTokensAPI(object): - """Webex Teams Access-Tokens API. + """Webex Access-Tokens API. - Wraps the Webex Teams Access-Tokens API and exposes the API as native + Wraps the Webex Access-Tokens API and exposes the API as native Python methods that return native Python objects. """ @@ -112,11 +112,11 @@ def get(self, client_id, client_secret, code, redirect_uri): Returns: AccessToken: An AccessToken object with the access token provided - by the Webex Teams cloud. + by the Webex cloud. Raises: TypeError: If the parameter types are incorrect. - ApiError: If the Webex Teams cloud returns an error. + ApiError: If the Webex cloud returns an error. """ check_type(client_id, basestring) @@ -153,12 +153,12 @@ def refresh(self, client_id, client_secret, refresh_token): Token. Returns: - AccessToken: With the access token provided by the Webex Teams + AccessToken: With the access token provided by the Webex cloud. Raises: TypeError: If the parameter types are incorrect. - ApiError: If the Webex Teams cloud returns an error. + ApiError: If the Webex cloud returns an error. """ check_type(client_id, basestring) diff --git a/src/webexpythonsdk/api/admin_audit_events.py b/src/webexpythonsdk/api/admin_audit_events.py index 2d0be55..641277e 100644 --- a/src/webexpythonsdk/api/admin_audit_events.py +++ b/src/webexpythonsdk/api/admin_audit_events.py @@ -33,9 +33,9 @@ from past.builtins import basestring -from webexteamssdk.generator_containers import generator_container -from webexteamssdk.restsession import RestSession -from webexteamssdk.utils import check_type, dict_from_items_with_values +from webexpythonsdk.generator_containers import generator_container +from webexpythonsdk.restsession import RestSession +from webexpythonsdk.utils import check_type, dict_from_items_with_values API_ENDPOINT = "adminAudit/events" @@ -45,7 +45,7 @@ class AdminAuditEventsAPI(object): """Admin Audit Events API. - Wraps the Webex Teams Admin Audit Events API and exposes the API as native + Wraps the Webex Admin Audit Events API and exposes the API as native Python methods that return native Python objects. """ @@ -55,7 +55,7 @@ def __init__(self, session, object_factory): Args: session(RestSession): The RESTful session object to be used for - API calls to the Webex Teams service. + API calls to the Webex service. Raises: TypeError: If the parameter types are incorrect. @@ -81,7 +81,7 @@ def list( ): """List Organizations. - This method supports Webex Teams's implementation of RFC5988 Web + This method supports Webex's implementation of RFC5988 Web Linking to provide pagination support. It returns a generator container that incrementally yields all audit events returned by the query. The generator will automatically request additional 'pages' of @@ -106,11 +106,11 @@ def list( Returns: GeneratorContainer: A GeneratorContainer which, when iterated, - yields the organizations returned by the Webex Teams query. + yields the organizations returned by the Webex query. Raises: TypeError: If the parameter types are incorrect. - ApiError: If the Webex Teams cloud returns an error. + ApiError: If the Webex cloud returns an error. """ check_type(orgId, basestring) check_type(_from, basestring) diff --git a/src/webexpythonsdk/api/attachment_actions.py b/src/webexpythonsdk/api/attachment_actions.py index d844847..0e92fb9 100644 --- a/src/webexpythonsdk/api/attachment_actions.py +++ b/src/webexpythonsdk/api/attachment_actions.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -"""Webex Teams Attachment Actions API wrapper. +"""Webex Attachment Actions API wrapper. Copyright (c) 2016-2024 Cisco and/or its affiliates. @@ -43,9 +43,9 @@ class AttachmentActionsAPI(object): - """Webex Teams Attachment Actions API. + """Webex Attachment Actions API. - Wraps the Webex Teams Attachment Actions API and exposes the API as + Wraps the Webex Attachment Actions API and exposes the API as native Python methods that return native Python objects. """ @@ -55,7 +55,7 @@ def __init__(self, session, object_factory): Args: session(RestSession): The RESTful session object to be used for - API calls to the Webex Teams service. + API calls to the Webex service. Raises: TypeError: If the parameter types are incorrect. @@ -83,7 +83,7 @@ def create(self, type, messageId, inputs, **request_parameters): Raises: TypeError: If the parameter types are incorrect. - ApiError: If the Webex Teams cloud returns an error. + ApiError: If the Webex cloud returns an error. ValueError: If the files parameter is a list of length > 1, or if the string in the list (the only element in the list) does not contain a valid URL or path to a local file. @@ -114,7 +114,7 @@ def get(self, id): Raises: TypeError: If the parameter types are incorrect. - ApiError: If the Webex Teams cloud returns an error. + ApiError: If the Webex cloud returns an error. """ check_type(id, basestring) diff --git a/src/webexpythonsdk/api/events.py b/src/webexpythonsdk/api/events.py index 1d46ab0..e9ffd22 100644 --- a/src/webexpythonsdk/api/events.py +++ b/src/webexpythonsdk/api/events.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -"""Webex Teams Events API wrapper. +"""Webex Events API wrapper. Copyright (c) 2016-2024 Cisco and/or its affiliates. @@ -46,9 +46,9 @@ class EventsAPI(object): - """Webex Teams Events API. + """Webex Events API. - Wraps the Webex Teams Events API and exposes the API as native Python + Wraps the Webex Events API and exposes the API as native Python methods that return native Python objects. """ @@ -58,7 +58,7 @@ def __init__(self, session, object_factory): Args: session(RestSession): The RESTful session object to be used for - API calls to the Webex Teams service. + API calls to the Webex service. Raises: TypeError: If the parameter types are incorrect. @@ -90,7 +90,7 @@ def list( Note: `from` is a keyword in Python and may not be used as a variable name, so we had to use `_from` instead. - This method supports Webex Teams's implementation of RFC5988 Web + This method supports Webex's implementation of RFC5988 Web Linking to provide pagination support. It returns a generator container that incrementally yields all events returned by the query. The generator will automatically request additional 'pages' of @@ -112,17 +112,17 @@ def list( to(basestring): Limit results to events which occurred before a date and time, in ISO8601 format (yyyy-MM-dd'T'HH:mm:ss.SSSZ). max(int): Limit the maximum number of items returned from the Webex - Teams service per request. + service per request. **request_parameters: Additional request parameters (provides support for parameters that may be added in the future). Returns: GeneratorContainer: A GeneratorContainer which, when iterated, - yields the events returned by the Webex Teams query. + yields the events returned by the Webex query. Raises: TypeError: If the parameter types are incorrect. - ApiError: If the Webex Teams cloud returns an error. + ApiError: If the Webex cloud returns an error. """ check_type(resource, basestring, optional=True) @@ -163,7 +163,7 @@ def get(self, eventId): Raises: TypeError: If the parameter types are incorrect. - ApiError: If the Webex Teams cloud returns an error. + ApiError: If the Webex cloud returns an error. """ check_type(eventId, basestring) diff --git a/src/webexpythonsdk/api/guest_issuer.py b/src/webexpythonsdk/api/guest_issuer.py index 4d484f3..985c4cb 100644 --- a/src/webexpythonsdk/api/guest_issuer.py +++ b/src/webexpythonsdk/api/guest_issuer.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -"""Webex Teams Guest Issuer API wrapper. +"""Webex Guest Issuer API wrapper. Copyright (c) 2016-2024 Cisco and/or its affiliates. @@ -52,9 +52,9 @@ class GuestIssuerAPI(object): - """Webex Teams Guest Issuer API. + """Webex Guest Issuer API. - Wraps the Webex Teams Guest Issuer API and exposes the API as native + Wraps the Webex Guest Issuer API and exposes the API as native methods that return native Python objects. """ @@ -64,7 +64,7 @@ def __init__(self, session, object_factory): Args: session(RestSession): The RESTful session object to be used for - API calls to the Webex Teams service + API calls to the Webex service Raises: TypeError: If the parameter types are incorrect @@ -86,9 +86,9 @@ def create(self, sub, name, iss, exp, secret): and public identifier for the guest user. This claim may contain only letters, numbers, and hyphens. name(basestring): The display name of the guest user. This will be - the name shown in Webex Teams clients. + the name shown in Webex clients. iss(basestring): The issuer of the token. Use the Guest - Issuer ID provided in My Webex Teams Apps. + Issuer ID provided in My Webex Apps. exp(basestring): The exp time of the token, as a UNIX timestamp in seconds. Use the lowest practical value for the use of the token. This is not the exp time for the guest diff --git a/src/webexpythonsdk/api/licenses.py b/src/webexpythonsdk/api/licenses.py index 0ac92ed..8273e1a 100644 --- a/src/webexpythonsdk/api/licenses.py +++ b/src/webexpythonsdk/api/licenses.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -"""Webex Teams Licenses API wrapper. +"""Webex Licenses API wrapper. Copyright (c) 2016-2024 Cisco and/or its affiliates. @@ -46,9 +46,9 @@ class LicensesAPI(object): - """Webex Teams Licenses API. + """Webex Licenses API. - Wraps the Webex Teams Licenses API and exposes the API as native Python + Wraps the Webex Licenses API and exposes the API as native Python methods that return native Python objects. """ @@ -58,7 +58,7 @@ def __init__(self, session, object_factory): Args: session(RestSession): The RESTful session object to be used for - API calls to the Webex Teams service. + API calls to the Webex service. Raises: TypeError: If the input object is not a dictionary or string. @@ -85,11 +85,11 @@ def list(self, orgId=None, **request_parameters): Returns: GeneratorContainer: A GeneratorContainer which, when iterated, - yields the licenses returned by the Webex Teams query. + yields the licenses returned by the Webex query. Raises: TypeError: If the parameter types are incorrect. - ApiError: If the Webex Teams cloud returns an error. + ApiError: If the Webex cloud returns an error. """ check_type(orgId, basestring, optional=True) @@ -118,7 +118,7 @@ def get(self, licenseId): Raises: TypeError: If the parameter types are incorrect. - ApiError: If the Webex Teams cloud returns an error. + ApiError: If the Webex cloud returns an error. """ check_type(licenseId, basestring) diff --git a/src/webexpythonsdk/api/meeting_invitees.py b/src/webexpythonsdk/api/meeting_invitees.py index 85a2543..0e368ae 100644 --- a/src/webexpythonsdk/api/meeting_invitees.py +++ b/src/webexpythonsdk/api/meeting_invitees.py @@ -58,7 +58,7 @@ def __init__(self, session, object_factory): Args: session(RestSession): The RESTful session object to be used for - API calls to the Webex Teams service. + API calls to the Webex service. Raises: TypeError: If the parameter types are incorrect. @@ -85,7 +85,7 @@ def list( Use query parameters to filter the response. - This method supports Webex Teams's implementation of RFC5988 Web + This method supports Webex's implementation of RFC5988 Web Linking to provide pagination support. It returns a generator container that incrementally yields all memberships returned by the query. The generator will automatically request additional 'pages' of @@ -113,7 +113,7 @@ def list( Raises: TypeError: If the parameter types are incorrect. - ApiError: If the Webex Teams cloud returns an error. + ApiError: If the Webex cloud returns an error. """ check_type(meetingId, basestring) @@ -180,7 +180,7 @@ def create( Raises: TypeError: If the parameter types are incorrect. - ApiError: If the Webex Teams cloud returns an error. + ApiError: If the Webex cloud returns an error. """ check_type(meetingId, basestring) @@ -220,7 +220,7 @@ def get(self, meetingInviteeId): Raises: TypeError: If the parameter types are incorrect. - ApiError: If the Webex Teams cloud returns an error. + ApiError: If the Webex cloud returns an error. """ check_type(meetingInviteeId, basestring) @@ -239,7 +239,7 @@ def delete(self, meetingInviteeId): Raises: TypeError: If the parameter types are incorrect. - ApiError: If the Webex Teams cloud returns an error. + ApiError: If the Webex cloud returns an error. """ check_type(meetingInviteeId, basestring) @@ -329,7 +329,7 @@ def bulk( Raises: TypeError: If the parameter types are incorrect. - ApiError: If the Webex Teams cloud returns an error. + ApiError: If the Webex cloud returns an error. """ check_type(meetingId, basestring) check_type(hostEmail, basestring, optional=True) diff --git a/src/webexpythonsdk/api/meeting_registrants.py b/src/webexpythonsdk/api/meeting_registrants.py index 70e4a8f..92a49ff 100644 --- a/src/webexpythonsdk/api/meeting_registrants.py +++ b/src/webexpythonsdk/api/meeting_registrants.py @@ -58,7 +58,7 @@ def __init__(self, session, object_factory): Args: session(RestSession): The RESTful session object to be used for - API calls to the Webex Teams service. + API calls to the Webex service. Raises: TypeError: If the parameter types are incorrect. @@ -88,7 +88,7 @@ def list( Use query parameters to filter the response. - This method supports Webex Teams's implementation of RFC5988 Web + This method supports Webex's implementation of RFC5988 Web Linking to provide pagination support. It returns a generator container that incrementally yields all memberships returned by the query. The generator will automatically request additional 'pages' of @@ -123,7 +123,7 @@ def list( Raises: TypeError: If the parameter types are incorrect. - ApiError: If the Webex Teams cloud returns an error. + ApiError: If the Webex cloud returns an error. """ check_type(meetingId, basestring) @@ -212,7 +212,7 @@ def create( Raises: TypeError: If the parameter types are incorrect. - ApiError: If the Webex Teams cloud returns an error. + ApiError: If the Webex cloud returns an error. """ check_type(meetingId, basestring) @@ -271,7 +271,7 @@ def get(self, meetingId, meetingRegistrantId): Raises: TypeError: If the parameter types are incorrect. - ApiError: If the Webex Teams cloud returns an error. + ApiError: If the Webex cloud returns an error. """ check_type(meetingId, basestring) @@ -295,7 +295,7 @@ def delete(self, meetingId, meetingRegistrantId): Raises: TypeError: If the parameter types are incorrect. - ApiError: If the Webex Teams cloud returns an error. + ApiError: If the Webex cloud returns an error. """ check_type(meetingId, basestring) diff --git a/src/webexpythonsdk/api/meeting_templates.py b/src/webexpythonsdk/api/meeting_templates.py index 0ebeff5..66c7b48 100644 --- a/src/webexpythonsdk/api/meeting_templates.py +++ b/src/webexpythonsdk/api/meeting_templates.py @@ -58,7 +58,7 @@ def __init__(self, session, object_factory): Args: session(RestSession): The RESTful session object to be used for - API calls to the Webex Teams service. + API calls to the Webex service. Raises: TypeError: If the parameter types are incorrect. @@ -87,7 +87,7 @@ def list( Use query parameters to filter the response. - This method supports Webex Teams's implementation of RFC5988 Web + This method supports Webex's implementation of RFC5988 Web Linking to provide pagination support. It returns a generator container that incrementally yields all memberships returned by the query. The generator will automatically request additional 'pages' of @@ -118,7 +118,7 @@ def list( Raises: TypeError: If the parameter types are incorrect. - ApiError: If the Webex Teams cloud returns an error. + ApiError: If the Webex cloud returns an error. """ check_type(templateType, basestring, optional=True) @@ -168,7 +168,7 @@ def get(self, meetingTemplateId): Raises: TypeError: If the parameter types are incorrect. - ApiError: If the Webex Teams cloud returns an error. + ApiError: If the Webex cloud returns an error. """ check_type(meetingTemplateId, basestring) diff --git a/src/webexpythonsdk/api/meetings.py b/src/webexpythonsdk/api/meetings.py index b9a534f..578b524 100644 --- a/src/webexpythonsdk/api/meetings.py +++ b/src/webexpythonsdk/api/meetings.py @@ -58,7 +58,7 @@ def __init__(self, session, object_factory): Args: session(RestSession): The RESTful session object to be used for - API calls to the Webex Teams service. + API calls to the Webex service. Raises: TypeError: If the parameter types are incorrect. @@ -95,7 +95,7 @@ def list( Use query parameters to filter the response. - This method supports Webex Teams's implementation of RFC5988 Web + This method supports Webex's implementation of RFC5988 Web Linking to provide pagination support. It returns a generator container that incrementally yields all memberships returned by the query. The generator will automatically request additional 'pages' of @@ -135,7 +135,7 @@ def list( Raises: TypeError: If the parameter types are incorrect. - ApiError: If the Webex Teams cloud returns an error. + ApiError: If the Webex cloud returns an error. """ check_type(meetingNumber, basestring, optional=True) @@ -300,7 +300,7 @@ def create( Raises: TypeError: If the parameter types are incorrect. - ApiError: If the Webex Teams cloud returns an error. + ApiError: If the Webex cloud returns an error. """ check_type(title, basestring) @@ -398,7 +398,7 @@ def get(self, meetingId): Raises: TypeError: If the parameter types are incorrect. - ApiError: If the Webex Teams cloud returns an error. + ApiError: If the Webex cloud returns an error. """ check_type(meetingId, basestring) @@ -418,7 +418,7 @@ def delete(self, meetingId): Raises: TypeError: If the parameter types are incorrect. - ApiError: If the Webex Teams cloud returns an error. + ApiError: If the Webex cloud returns an error. """ check_type(meetingId, basestring) diff --git a/src/webexpythonsdk/api/memberships.py b/src/webexpythonsdk/api/memberships.py index 8115680..1058731 100644 --- a/src/webexpythonsdk/api/memberships.py +++ b/src/webexpythonsdk/api/memberships.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -"""Webex Teams Memberships API wrapper. +"""Webex Memberships API wrapper. Copyright (c) 2016-2024 Cisco and/or its affiliates. @@ -46,9 +46,9 @@ class MembershipsAPI(object): - """Webex Teams Memberships API. + """Webex Memberships API. - Wraps the Webex Teams Memberships API and exposes the API as native Python + Wraps the Webex Memberships API and exposes the API as native Python methods that return native Python objects. """ @@ -58,7 +58,7 @@ def __init__(self, session, object_factory): Args: session(RestSession): The RESTful session object to be used for - API calls to the Webex Teams service. + API calls to the Webex service. Raises: TypeError: If the parameter types are incorrect. @@ -91,7 +91,7 @@ def list( Use either `personId` or `personEmail` to filter the results. - This method supports Webex Teams's implementation of RFC5988 Web + This method supports Webex's implementation of RFC5988 Web Linking to provide pagination support. It returns a generator container that incrementally yields all memberships returned by the query. The generator will automatically request additional 'pages' of @@ -107,17 +107,17 @@ def list( personEmail(basestring): Limit results to a specific person, by email address. max(int): Limit the maximum number of items returned from the Webex - Teams service per request. + service per request. **request_parameters: Additional request parameters (provides support for parameters that may be added in the future). Returns: GeneratorContainer: A GeneratorContainer which, when iterated, - yields the memberships returned by the Webex Teams query. + yields the memberships returned by the Webex query. Raises: TypeError: If the parameter types are incorrect. - ApiError: If the Webex Teams cloud returns an error. + ApiError: If the Webex cloud returns an error. """ check_type(roomId, basestring, optional=True) @@ -167,7 +167,7 @@ def create( Raises: TypeError: If the parameter types are incorrect. - ApiError: If the Webex Teams cloud returns an error. + ApiError: If the Webex cloud returns an error. """ check_type(roomId, basestring) @@ -201,7 +201,7 @@ def get(self, membershipId): Raises: TypeError: If the parameter types are incorrect. - ApiError: If the Webex Teams cloud returns an error. + ApiError: If the Webex cloud returns an error. """ check_type(membershipId, basestring) @@ -222,12 +222,12 @@ def update(self, membershipId, isModerator=None, **request_parameters): support for parameters that may be added in the future). Returns: - Membership: A Membership object with the updated Webex Teams + Membership: A Membership object with the updated Webex membership details. Raises: TypeError: If the parameter types are incorrect. - ApiError: If the Webex Teams cloud returns an error. + ApiError: If the Webex cloud returns an error. """ check_type(membershipId, basestring) @@ -254,7 +254,7 @@ def delete(self, membershipId): Raises: TypeError: If the parameter types are incorrect. - ApiError: If the Webex Teams cloud returns an error. + ApiError: If the Webex cloud returns an error. """ check_type(membershipId, basestring) diff --git a/src/webexpythonsdk/api/messages.py b/src/webexpythonsdk/api/messages.py index daa02ea..ce8870f 100644 --- a/src/webexpythonsdk/api/messages.py +++ b/src/webexpythonsdk/api/messages.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -"""Webex Teams Messages API wrapper. +"""Webex Messages API wrapper. Copyright (c) 2016-2024 Cisco and/or its affiliates. @@ -34,7 +34,7 @@ from past.builtins import basestring from requests_toolbelt import MultipartEncoder -from webexteamssdk.models.cards import AdaptiveCard +from webexpythonsdk.models.cards import AdaptiveCard from ..generator_containers import generator_container from ..restsession import RestSession from ..utils import ( @@ -52,9 +52,9 @@ class MessagesAPI(object): - """Webex Teams Messages API. + """Webex Messages API. - Wraps the Webex Teams Messages API and exposes the API as native Python + Wraps the Webex Messages API and exposes the API as native Python methods that return native Python objects. """ @@ -64,7 +64,7 @@ def __init__(self, session, object_factory): Args: session(RestSession): The RESTful session object to be used for - API calls to the Webex Teams service. + API calls to the Webex service. Raises: TypeError: If the parameter types are incorrect. @@ -92,7 +92,7 @@ def list( The list API sorts the messages in descending order by creation date. - This method supports Webex Teams's implementation of RFC5988 Web + This method supports Webex's implementation of RFC5988 Web Linking to provide pagination support. It returns a generator container that incrementally yields all messages returned by the query. The generator will automatically request additional 'pages' of @@ -112,17 +112,17 @@ def list( beforeMessage(basestring): List messages sent before a message, by ID. max(int): Limit the maximum number of items returned from the Webex - Teams service per request. + service per request. **request_parameters: Additional request parameters (provides support for parameters that may be added in the future). Returns: GeneratorContainer: A GeneratorContainer which, when iterated, - yields the messages returned by the Webex Teams query. + yields the messages returned by the Webex query. Raises: TypeError: If the parameter types are incorrect. - ApiError: If the Webex Teams cloud returns an error. + ApiError: If the Webex cloud returns an error. """ check_type(roomId, basestring) @@ -164,7 +164,7 @@ def list_direct( The list API sorts the messages in descending order by creation date. - This method supports Webex Teams's implementation of RFC5988 Web + This method supports Webex's implementation of RFC5988 Web Linking to provide pagination support. It returns a generator container that incrementally yields all messages returned by the query. The generator will automatically request additional 'pages' of @@ -184,11 +184,11 @@ def list_direct( Returns: GeneratorContainer: A GeneratorContainer which, when iterated, - yields the messages returned by the Webex Teams query. + yields the messages returned by the Webex query. Raises: TypeError: If the parameter types are incorrect. - ApiError: If the Webex Teams cloud returns an error. + ApiError: If the Webex cloud returns an error. """ check_type(personId, basestring, optional=True) @@ -254,7 +254,7 @@ def create( Raises: TypeError: If the parameter types are incorrect. - ApiError: If the Webex Teams cloud returns an error. + ApiError: If the Webex cloud returns an error. ValueError: If the files parameter is a list of length > 1, or if the string in the list (the only element in the list) does not contain a valid URL or path to a local file. @@ -341,7 +341,7 @@ def get(self, messageId): Raises: TypeError: If the parameter types are incorrect. - ApiError: If the Webex Teams cloud returns an error. + ApiError: If the Webex cloud returns an error. """ check_type(messageId, basestring) @@ -360,7 +360,7 @@ def delete(self, messageId): Raises: TypeError: If the parameter types are incorrect. - ApiError: If the Webex Teams cloud returns an error. + ApiError: If the Webex cloud returns an error. """ check_type(messageId, basestring) @@ -381,7 +381,7 @@ def edit(self, messageId=None, roomId=None, text=None, markdown=None): Raises: TypeError: If the parameter types are incorrect. - ApiError: If the Webex Teams cloud returns an error. + ApiError: If the Webex cloud returns an error. """ check_type(messageId, basestring) diff --git a/src/webexpythonsdk/api/organizations.py b/src/webexpythonsdk/api/organizations.py index 9cefc64..fc023d6 100644 --- a/src/webexpythonsdk/api/organizations.py +++ b/src/webexpythonsdk/api/organizations.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -"""Webex Teams Organizations API wrapper. +"""Webex Organizations API wrapper. Copyright (c) 2016-2024 Cisco and/or its affiliates. @@ -33,9 +33,9 @@ from past.builtins import basestring -from webexteamssdk.generator_containers import generator_container -from webexteamssdk.restsession import RestSession -from webexteamssdk.utils import check_type, dict_from_items_with_values +from webexpythonsdk.generator_containers import generator_container +from webexpythonsdk.restsession import RestSession +from webexpythonsdk.utils import check_type, dict_from_items_with_values API_ENDPOINT = "organizations" @@ -43,9 +43,9 @@ class OrganizationsAPI(object): - """Webex Teams Organizations API. + """Webex Organizations API. - Wraps the Webex Teams Organizations API and exposes the API as native + Wraps the Webex Organizations API and exposes the API as native Python methods that return native Python objects. """ @@ -55,7 +55,7 @@ def __init__(self, session, object_factory): Args: session(RestSession): The RESTful session object to be used for - API calls to the Webex Teams service. + API calls to the Webex service. Raises: TypeError: If the parameter types are incorrect. @@ -78,11 +78,11 @@ def list(self, **request_parameters): Returns: GeneratorContainer: A GeneratorContainer which, when iterated, - yields the organizations returned by the Webex Teams query. + yields the organizations returned by the Webex query. Raises: TypeError: If the parameter types are incorrect. - ApiError: If the Webex Teams cloud returns an error. + ApiError: If the Webex cloud returns an error. """ # API request - get items @@ -106,7 +106,7 @@ def get(self, orgId): Raises: TypeError: If the parameter types are incorrect. - ApiError: If the Webex Teams cloud returns an error. + ApiError: If the Webex cloud returns an error. """ check_type(orgId, basestring) diff --git a/src/webexpythonsdk/api/people.py b/src/webexpythonsdk/api/people.py index 92c7c4f..8c74e48 100644 --- a/src/webexpythonsdk/api/people.py +++ b/src/webexpythonsdk/api/people.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -"""Webex Teams People API wrapper. +"""Webex People API wrapper. Copyright (c) 2016-2024 Cisco and/or its affiliates. @@ -46,9 +46,9 @@ class PeopleAPI(object): - """Webex Teams People API. + """Webex People API. - Wraps the Webex Teams People API and exposes the API as native Python + Wraps the Webex People API and exposes the API as native Python methods that return native Python objects. """ @@ -58,7 +58,7 @@ def __init__(self, session, object_factory): Args: session(RestSession): The RESTful session object to be used for - API calls to the Webex Teams service. + API calls to the Webex service. Raises: TypeError: If the parameter types are incorrect. @@ -93,7 +93,7 @@ def list( will not be shown if the authenticated user has disabled status sharing. - This method supports Webex Teams's implementation of RFC5988 Web + This method supports Webex's implementation of RFC5988 Web Linking to provide pagination support. It returns a generator container that incrementally yields all people returned by the query. The generator will automatically request additional 'pages' of @@ -111,17 +111,17 @@ def list( separated by commas. orgId(basestring): The organization ID. max(int): Limit the maximum number of items returned from the Webex - Teams service per request. + service per request. **request_parameters: Additional request parameters (provides support for parameters that may be added in the future). Returns: GeneratorContainer: A GeneratorContainer which, when iterated, - yields the people returned by the Webex Teams query. + yields the people returned by the Webex query. Raises: TypeError: If the parameter types are incorrect. - ApiError: If the Webex Teams cloud returns an error. + ApiError: If the Webex cloud returns an error. """ check_type(id, basestring, optional=True) @@ -210,7 +210,7 @@ def create( Raises: TypeError: If the parameter types are incorrect. - ApiError: If the Webex Teams cloud returns an error. + ApiError: If the Webex cloud returns an error. """ check_type(emails, list) @@ -278,7 +278,7 @@ def get(self, personId): Raises: TypeError: If the parameter types are incorrect. - ApiError: If the Webex Teams cloud returns an error. + ApiError: If the Webex cloud returns an error. """ check_type(personId, basestring) @@ -306,7 +306,7 @@ def update( Only an admin can update a person's details. - Email addresses for a person cannot be changed via the Webex Teams API. + Email addresses for a person cannot be changed via the Webex API. Include all details for the person. This action expects all user details to be present in the request. A common approach is to first GET @@ -335,7 +335,7 @@ def update( Raises: TypeError: If the parameter types are incorrect. - ApiError: If the Webex Teams cloud returns an error. + ApiError: If the Webex cloud returns an error. """ check_type(emails, list, optional=True) @@ -377,7 +377,7 @@ def delete(self, personId): Raises: TypeError: If the parameter types are incorrect. - ApiError: If the Webex Teams cloud returns an error. + ApiError: If the Webex cloud returns an error. """ check_type(personId, basestring) @@ -389,7 +389,7 @@ def me(self): """Get the details of the person accessing the API. Raises: - ApiError: If the Webex Teams cloud returns an error. + ApiError: If the Webex cloud returns an error. """ # API request diff --git a/src/webexpythonsdk/api/recordings.py b/src/webexpythonsdk/api/recordings.py index 546c974..9d0952b 100644 --- a/src/webexpythonsdk/api/recordings.py +++ b/src/webexpythonsdk/api/recordings.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -"""Webex Teams Recordings API wrapper. +"""Webex Recordings API wrapper. Copyright (c) 2016-2024 Cisco and/or its affiliates. @@ -32,20 +32,20 @@ from builtins import * from past.builtins import basestring -from webexteamssdk.generator_containers import generator_container +from webexpythonsdk.generator_containers import generator_container -from webexteamssdk.utils import check_type, dict_from_items_with_values +from webexpythonsdk.utils import check_type, dict_from_items_with_values -from webexteamssdk.restsession import RestSession +from webexpythonsdk.restsession import RestSession API_ENDPOINT = "recordings" OBJECT_TYPE = "recording" class RecordingsAPI(object): - """Webex Teams Recordings API. + """Webex Recordings API. - Wraps the Webex Teams Recordings API and exposes the API as native Python + Wraps the Webex Recordings API and exposes the API as native Python methods that return native Python objects. """ @@ -55,7 +55,7 @@ def __init__(self, session, object_factory): Args: session(RestSession): The RESTful session object to be used for - API calls to the Webex Teams service. + API calls to the Webex service. Raises: TypeError: If the parameter types are incorrect. @@ -90,7 +90,7 @@ def list( user will be listed. The list returned is sorted in descending order by the date and time that the recordings were created. - This method supports Webex Teams's implementation of RFC5988 Web + This method supports Webex's implementation of RFC5988 Web Linking to provide pagination support. It returns a generator container that incrementally yields all recordings returned by the query. The generator will automatically request additional 'pages' of @@ -102,7 +102,7 @@ def list( Args: max(int): Limit the maximum number of items returned from the Webex - Teams service per request. + service per request. _from(basestring): List recordings which occurred after a specific date and time. to(basestring): List recordings which occurred before a specific @@ -127,11 +127,11 @@ def list( Returns: GeneratorContainer: A GeneratorContainer which, when iterated, - yields the recordings returned by the Webex Teams query. + yields the recordings returned by the Webex query. Raises: TypeError: If the parameter types are incorrect. - ApiError: If the Webex Teams cloud returns an error. + ApiError: If the Webex cloud returns an error. """ check_type(max, int, optional=True) check_type(_from, basestring, optional=True) @@ -178,7 +178,7 @@ def get(self, recordingId, siteUrl=None, hostEmail=None): Raises: TypeError: If the parameter types are incorrect. - ApiError: If the Webex Teams cloud returns an error. + ApiError: If the Webex cloud returns an error. """ check_type(recordingId, basestring) @@ -206,7 +206,7 @@ def delete(self, recordingId, siteUrl=None, hostEmail=None): Raises: TypeError: If the parameter types are incorrect. - ApiError: If the Webex Teams cloud returns an error. + ApiError: If the Webex cloud returns an error. """ check_type(recordingId, basestring) diff --git a/src/webexpythonsdk/api/roles.py b/src/webexpythonsdk/api/roles.py index 540ba8d..75ce62e 100644 --- a/src/webexpythonsdk/api/roles.py +++ b/src/webexpythonsdk/api/roles.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -"""Webex Teams Roles API wrapper. +"""Webex Roles API wrapper. Copyright (c) 2016-2024 Cisco and/or its affiliates. @@ -46,9 +46,9 @@ class RolesAPI(object): - """Webex Teams Roles API. + """Webex Roles API. - Wraps the Webex Teams Roles API and exposes the API as native Python + Wraps the Webex Roles API and exposes the API as native Python methods that return native Python objects. """ @@ -58,7 +58,7 @@ def __init__(self, session, object_factory): Args: session(RestSession): The RESTful session object to be used for - API calls to the Webex Teams service. + API calls to the Webex service. Raises: TypeError: If the parameter types are incorrect. @@ -81,11 +81,11 @@ def list(self, **request_parameters): Returns: GeneratorContainer: A GeneratorContainer which, when iterated, - yields the roles returned by the Webex Teams query. + yields the roles returned by the Webex query. Raises: TypeError: If the parameter types are incorrect. - ApiError: If the Webex Teams cloud returns an error. + ApiError: If the Webex cloud returns an error. """ # API request - get items @@ -108,7 +108,7 @@ def get(self, roleId): Raises: TypeError: If the parameter types are incorrect. - ApiError: If the Webex Teams cloud returns an error. + ApiError: If the Webex cloud returns an error. """ check_type(roleId, basestring) diff --git a/src/webexpythonsdk/api/room_tabs.py b/src/webexpythonsdk/api/room_tabs.py index 5d92cbf..ce92fcb 100644 --- a/src/webexpythonsdk/api/room_tabs.py +++ b/src/webexpythonsdk/api/room_tabs.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -"""Webex Teams Room Tabs API wrapper. +"""Webex Room Tabs API wrapper. Copyright (c) 2016-2024 Cisco and/or its affiliates. @@ -46,9 +46,9 @@ class RoomTabsAPI(object): - """Webex Teams Room Tabs API. + """Webex Room Tabs API. - Wraps the Webex Teams Room Tabs API and exposes the API as native Python + Wraps the Webex Room Tabs API and exposes the API as native Python methods that return native Python objects. """ @@ -58,7 +58,7 @@ def __init__(self, session, object_factory): Args: session(RestSession): The RESTful session object to be used for - API calls to the Webex Teams service. + API calls to the Webex service. Raises: TypeError: If the parameter types are incorrect. @@ -75,7 +75,7 @@ def __init__(self, session, object_factory): def list(self, roomId, **request_parameters): """Lists all Room Tabs of a room. - This method supports Webex Teams's implementation of RFC5988 Web + This method supports Webex's implementation of RFC5988 Web Linking to provide pagination support. It returns a generator container that incrementally yields all room tabs returned by the query. The generator will automatically request additional 'pages' of @@ -92,11 +92,11 @@ def list(self, roomId, **request_parameters): Returns: GeneratorContainer: A GeneratorContainer which, when iterated, - yields the room tabs returned by the Webex Teams query. + yields the room tabs returned by the Webex query. Raises: TypeError: If the parameter types are incorrect. - ApiError: If the Webex Teams cloud returns an error. + ApiError: If the Webex cloud returns an error. """ check_type(roomId, basestring) @@ -130,7 +130,7 @@ def create(self, roomId, contentUrl, displayName, **request_parameters): Raises: TypeError: If the parameter types are incorrect. - ApiError: If the Webex Teams cloud returns an error. + ApiError: If the Webex cloud returns an error. """ check_type(roomId, basestring) @@ -161,7 +161,7 @@ def get(self, roomTabId): Raises: TypeError: If the parameter types are incorrect. - ApiError: If the Webex Teams cloud returns an error. + ApiError: If the Webex cloud returns an error. """ check_type(roomTabId, basestring) @@ -187,11 +187,11 @@ def update( support for parameters that may be added in the future). Returns: - Room: A Room object with the updated Webex Teams room details. + Room: A Room object with the updated Webex room details. Raises: TypeError: If the parameter types are incorrect. - ApiError: If the Webex Teams cloud returns an error. + ApiError: If the Webex cloud returns an error. """ check_type(roomTabId, basestring) @@ -223,7 +223,7 @@ def delete(self, roomTabId): Raises: TypeError: If the parameter types are incorrect. - ApiError: If the Webex Teams cloud returns an error. + ApiError: If the Webex cloud returns an error. """ check_type(roomTabId, basestring) diff --git a/src/webexpythonsdk/api/rooms.py b/src/webexpythonsdk/api/rooms.py index e866243..32bc7d9 100644 --- a/src/webexpythonsdk/api/rooms.py +++ b/src/webexpythonsdk/api/rooms.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -"""Webex Teams Rooms API wrapper. +"""Webex Rooms API wrapper. Copyright (c) 2016-2024 Cisco and/or its affiliates. @@ -46,9 +46,9 @@ class RoomsAPI(object): - """Webex Teams Rooms API. + """Webex Rooms API. - Wraps the Webex Teams Rooms API and exposes the API as native Python + Wraps the Webex Rooms API and exposes the API as native Python methods that return native Python objects. """ @@ -58,7 +58,7 @@ def __init__(self, session, object_factory): Args: session(RestSession): The RESTful session object to be used for - API calls to the Webex Teams service. + API calls to the Webex service. Raises: TypeError: If the parameter types are incorrect. @@ -84,7 +84,7 @@ def list( By default, lists rooms to which the authenticated user belongs. - This method supports Webex Teams's implementation of RFC5988 Web + This method supports Webex's implementation of RFC5988 Web Linking to provide pagination support. It returns a generator container that incrementally yields all rooms returned by the query. The generator will automatically request additional 'pages' of @@ -104,17 +104,17 @@ def list( activity (`lastactivity`), or most recently created (`created`). max(int): Limit the maximum number of items returned from the Webex - Teams service per request. + service per request. **request_parameters: Additional request parameters (provides support for parameters that may be added in the future). Returns: GeneratorContainer: A GeneratorContainer which, when iterated, - yields the rooms returned by the Webex Teams query. + yields the rooms returned by the Webex query. Raises: TypeError: If the parameter types are incorrect. - ApiError: If the Webex Teams cloud returns an error. + ApiError: If the Webex cloud returns an error. """ check_type(teamId, basestring, optional=True) @@ -173,7 +173,7 @@ def create( Raises: TypeError: If the parameter types are incorrect. - ApiError: If the Webex Teams cloud returns an error. + ApiError: If the Webex cloud returns an error. """ check_type(title, basestring) @@ -207,7 +207,7 @@ def get(self, roomId): Raises: TypeError: If the parameter types are incorrect. - ApiError: If the Webex Teams cloud returns an error. + ApiError: If the Webex cloud returns an error. """ check_type(roomId, basestring) @@ -231,7 +231,7 @@ def get_meeting_info(self, roomId): Raises: TypeError: If the parameter types are incorrect. - ApiError: If the Webex Teams cloud returns an error. + ApiError: If the Webex cloud returns an error. """ check_type(roomId, basestring) @@ -281,11 +281,11 @@ def update( support for parameters that may be added in the future). Returns: - Room: A Room object with the updated Webex Teams room details. + Room: A Room object with the updated Webex room details. Raises: TypeError: If the parameter types are incorrect. - ApiError: If the Webex Teams cloud returns an error. + ApiError: If the Webex cloud returns an error. """ check_type(roomId, basestring) @@ -326,7 +326,7 @@ def delete(self, roomId): Raises: TypeError: If the parameter types are incorrect. - ApiError: If the Webex Teams cloud returns an error. + ApiError: If the Webex cloud returns an error. """ check_type(roomId, basestring) diff --git a/src/webexpythonsdk/api/team_memberships.py b/src/webexpythonsdk/api/team_memberships.py index 67a2184..a0cce41 100644 --- a/src/webexpythonsdk/api/team_memberships.py +++ b/src/webexpythonsdk/api/team_memberships.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -"""Webex Teams Memberships API wrapper. +"""Webex Memberships API wrapper. Copyright (c) 2016-2024 Cisco and/or its affiliates. @@ -46,9 +46,9 @@ class TeamMembershipsAPI(object): - """Webex Teams Team-Memberships API. + """Webex Team-Memberships API. - Wraps the Webex Teams Memberships API and exposes the API as native Python + Wraps the Webex Memberships API and exposes the API as native Python methods that return native Python objects. """ @@ -58,7 +58,7 @@ def __init__(self, session, object_factory): Args: session(RestSession): The RESTful session object to be used for - API calls to the Webex Teams service. + API calls to the Webex service. Raises: TypeError: If the parameter types are incorrect. @@ -75,7 +75,7 @@ def __init__(self, session, object_factory): def list(self, teamId, max=100, **request_parameters): """List team memberships for a team, by ID. - This method supports Webex Teams's implementation of RFC5988 Web + This method supports Webex's implementation of RFC5988 Web Linking to provide pagination support. It returns a generator container that incrementally yields all team memberships returned by the query. The generator will automatically request additional 'pages' @@ -88,17 +88,17 @@ def list(self, teamId, max=100, **request_parameters): Args: teamId(basestring): List team memberships for a team, by ID. max(int): Limit the maximum number of items returned from the Webex - Teams service per request. + service per request. **request_parameters: Additional request parameters (provides support for parameters that may be added in the future). Returns: GeneratorContainer: A GeneratorContainer which, when iterated, - yields the team memberships returned by the Webex Teams query. + yields the team memberships returned by the Webex query. Raises: TypeError: If the parameter types are incorrect. - ApiError: If the Webex Teams cloud returns an error. + ApiError: If the Webex cloud returns an error. """ check_type(teamId, basestring) @@ -145,7 +145,7 @@ def create( Raises: TypeError: If the parameter types are incorrect. - ApiError: If the Webex Teams cloud returns an error. + ApiError: If the Webex cloud returns an error. """ check_type(teamId, basestring) @@ -179,7 +179,7 @@ def get(self, membershipId): Raises: TypeError: If the parameter types are incorrect. - ApiError: If the Webex Teams cloud returns an error. + ApiError: If the Webex cloud returns an error. """ check_type(membershipId, basestring) @@ -201,11 +201,11 @@ def update(self, membershipId, isModerator=None, **request_parameters): Returns: TeamMembership: A TeamMembership object with the updated Webex - Teams team-membership details. + team-membership details. Raises: TypeError: If the parameter types are incorrect. - ApiError: If the Webex Teams cloud returns an error. + ApiError: If the Webex cloud returns an error. """ check_type(membershipId, basestring) @@ -232,7 +232,7 @@ def delete(self, membershipId): Raises: TypeError: If the parameter types are incorrect. - ApiError: If the Webex Teams cloud returns an error. + ApiError: If the Webex cloud returns an error. """ check_type(membershipId, basestring) diff --git a/src/webexpythonsdk/api/teams.py b/src/webexpythonsdk/api/teams.py index a358b0d..7bac04b 100644 --- a/src/webexpythonsdk/api/teams.py +++ b/src/webexpythonsdk/api/teams.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -"""Webex Teams Teams-API wrapper. +"""Webex Teams-API wrapper. Copyright (c) 2016-2024 Cisco and/or its affiliates. @@ -46,9 +46,9 @@ class TeamsAPI(object): - """Webex Teams Teams API. + """Webex Teams API. - Wraps the Webex Teams Teams API and exposes the API as native Python + Wraps the Webex Teams API and exposes the API as native Python methods that return native Python objects. """ @@ -58,7 +58,7 @@ def __init__(self, session, object_factory): Args: session(RestSession): The RESTful session object to be used for - API calls to the Webex Teams service. + API calls to the Webex service. Raises: TypeError: If the parameter types are incorrect. @@ -75,7 +75,7 @@ def __init__(self, session, object_factory): def list(self, max=100, **request_parameters): """List teams to which the authenticated user belongs. - This method supports Webex Teams's implementation of RFC5988 Web + This method supports Webex's implementation of RFC5988 Web Linking to provide pagination support. It returns a generator container that incrementally yields all teams returned by the query. The generator will automatically request additional 'pages' of @@ -87,17 +87,17 @@ def list(self, max=100, **request_parameters): Args: max(int): Limit the maximum number of items returned from the Webex - Teams service per request. + service per request. **request_parameters: Additional request parameters (provides support for parameters that may be added in the future). Returns: GeneratorContainer: A GeneratorContainer which, when iterated, - yields the teams returned by the Webex Teams query. + yields the teams returned by the Webex query. Raises: TypeError: If the parameter types are incorrect. - ApiError: If the Webex Teams cloud returns an error. + ApiError: If the Webex cloud returns an error. """ check_type(max, int, optional=True) @@ -129,7 +129,7 @@ def create(self, name, **request_parameters): Raises: TypeError: If the parameter types are incorrect. - ApiError: If the Webex Teams cloud returns an error. + ApiError: If the Webex cloud returns an error. """ check_type(name, basestring) @@ -156,7 +156,7 @@ def get(self, teamId): Raises: TypeError: If the parameter types are incorrect. - ApiError: If the Webex Teams cloud returns an error. + ApiError: If the Webex cloud returns an error. """ check_type(teamId, basestring) @@ -177,11 +177,11 @@ def update(self, teamId, name, **request_parameters): support for parameters that may be added in the future). Returns: - Team: A Team object with the updated Webex Teams team details. + Team: A Team object with the updated Webex team details. Raises: TypeError: If the parameter types are incorrect. - ApiError: If the Webex Teams cloud returns an error. + ApiError: If the Webex cloud returns an error. """ check_type(teamId, basestring) @@ -208,7 +208,7 @@ def delete(self, teamId): Raises: TypeError: If the parameter types are incorrect. - ApiError: If the Webex Teams cloud returns an error. + ApiError: If the Webex cloud returns an error. """ check_type(teamId, basestring) diff --git a/src/webexpythonsdk/api/webhooks.py b/src/webexpythonsdk/api/webhooks.py index 5becad0..97420b3 100644 --- a/src/webexpythonsdk/api/webhooks.py +++ b/src/webexpythonsdk/api/webhooks.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -"""Webex Teams Webhooks API wrapper. +"""Webex Webhooks API wrapper. Copyright (c) 2016-2024 Cisco and/or its affiliates. @@ -46,9 +46,9 @@ class WebhooksAPI(object): - """Webex Teams Webhooks API. + """Webex Webhooks API. - Wraps the Webex Teams Webhooks API and exposes the API as native Python + Wraps the Webex Webhooks API and exposes the API as native Python methods that return native Python objects. """ @@ -58,7 +58,7 @@ def __init__(self, session, object_factory): Args: session(RestSession): The RESTful session object to be used for - API calls to the Webex Teams service. + API calls to the Webex service. Raises: TypeError: If the parameter types are incorrect. @@ -75,7 +75,7 @@ def __init__(self, session, object_factory): def list(self, max=100, **request_parameters): """List all of the authenticated user's webhooks. - This method supports Webex Teams's implementation of RFC5988 Web + This method supports Webex's implementation of RFC5988 Web Linking to provide pagination support. It returns a generator container that incrementally yields all webhooks returned by the query. The generator will automatically request additional 'pages' of @@ -87,17 +87,17 @@ def list(self, max=100, **request_parameters): Args: max(int): Limit the maximum number of items returned from the Webex - Teams service per request. + service per request. **request_parameters: Additional request parameters (provides support for parameters that may be added in the future). Returns: GeneratorContainer: A GeneratorContainer which, when iterated, - yields the webhooks returned by the Webex Teams query. + yields the webhooks returned by the Webex query. Raises: TypeError: If the parameter types are incorrect. - ApiError: If the Webex Teams cloud returns an error. + ApiError: If the Webex cloud returns an error. """ check_type(max, int, optional=True) @@ -142,7 +142,7 @@ def create( Raises: TypeError: If the parameter types are incorrect. - ApiError: If the Webex Teams cloud returns an error. + ApiError: If the Webex cloud returns an error. """ check_type(name, basestring) @@ -180,7 +180,7 @@ def get(self, webhookId): Raises: TypeError: If the parameter types are incorrect. - ApiError: If the Webex Teams cloud returns an error. + ApiError: If the Webex cloud returns an error. """ check_type(webhookId, basestring) @@ -205,12 +205,12 @@ def update( support for parameters that may be added in the future). Returns: - Webhook: A Webhook object with the updated Webex Teams webhook + Webhook: A Webhook object with the updated Webex webhook details. Raises: TypeError: If the parameter types are incorrect. - ApiError: If the Webex Teams cloud returns an error. + ApiError: If the Webex cloud returns an error. """ check_type(webhookId, basestring) @@ -239,7 +239,7 @@ def delete(self, webhookId): Raises: TypeError: If the parameter types are incorrect. - ApiError: If the Webex Teams cloud returns an error. + ApiError: If the Webex cloud returns an error. """ check_type(webhookId, basestring) diff --git a/src/webexpythonsdk/config.py b/src/webexpythonsdk/config.py index a1aa963..3f37557 100644 --- a/src/webexpythonsdk/config.py +++ b/src/webexpythonsdk/config.py @@ -29,11 +29,12 @@ DEFAULT_WAIT_ON_RATE_LIMIT = True -ACCESS_TOKEN_ENVIRONMENT_VARIABLE = "WEBEX_TEAMS_ACCESS_TOKEN" +ACCESS_TOKEN_ENVIRONMENT_VARIABLE = "WEBEX_ACCESS_TOKEN" LEGACY_ACCESS_TOKEN_ENVIRONMENT_VARIABLES = [ "SPARK_ACCESS_TOKEN", "CISCO_SPARK_ACCESS_TOKEN", + "WEBEX_ACCESS_TOKEN", ] -WEBEX_TEAMS_DATETIME_FORMAT = "%Y-%m-%dT%H:%M:%S.%fZ" +WEBEX_DATETIME_FORMAT = "%Y-%m-%dT%H:%M:%S.%fZ" diff --git a/src/webexpythonsdk/environment.py b/src/webexpythonsdk/environment.py index e09b9ed..bbf0718 100644 --- a/src/webexpythonsdk/environment.py +++ b/src/webexpythonsdk/environment.py @@ -63,4 +63,4 @@ def _get_access_token(): # Package Environment Variables -WEBEX_TEAMS_ACCESS_TOKEN = _get_access_token() +WEBEX_ACCESS_TOKEN = _get_access_token() diff --git a/src/webexpythonsdk/exceptions.py b/src/webexpythonsdk/exceptions.py index 589b932..9effb97 100644 --- a/src/webexpythonsdk/exceptions.py +++ b/src/webexpythonsdk/exceptions.py @@ -40,26 +40,26 @@ logger = logging.getLogger(__name__) -class webexteamssdkException(Exception): - """Base class for all webexteamssdk package exceptions.""" +class webexpythonsdkException(Exception): + """Base class for all webexpythonsdk package exceptions.""" pass -class webexteamssdkWarning(webexteamssdkException, Warning): - """Base class for all webexteamssdk warnings.""" +class webexpythonsdkWarning(webexpythonsdkException, Warning): + """Base class for all webexpythonsdk warnings.""" pass -class AccessTokenError(webexteamssdkException): - """Raised when an incorrect Webex Teams Access Token has been provided.""" +class AccessTokenError(webexpythonsdkException): + """Raised when an incorrect Webex Access Token has been provided.""" pass -class ApiError(webexteamssdkException): - """Errors returned in response to requests sent to the Webex Teams APIs. +class ApiError(webexpythonsdkException): + """Errors returned in response to requests sent to the Webex APIs. Several data attributes are available for inspection. """ @@ -127,7 +127,7 @@ def __repr__(self): ) -class ApiWarning(webexteamssdkWarning, ApiError): +class ApiWarning(webexpythonsdkWarning, ApiError): """Warnings raised from API responses received from the Webex APIs. Several data attributes are available for inspection. @@ -137,7 +137,7 @@ class ApiWarning(webexteamssdkWarning, ApiError): class RateLimitError(ApiError): - """Webex Teams Rate-Limit exceeded Error. + """Webex Rate-Limit exceeded Error. Raised when a rate-limit exceeded message is received and the request **will not** be retried. @@ -148,18 +148,18 @@ def __init__(self, response): # Extended exception attributes self.retry_after = max(1, int(response.headers.get("Retry-After", 15))) - """The `Retry-After` time period (in seconds) provided by Webex Teams. + """The `Retry-After` time period (in seconds) provided by Webex. Defaults to 15 seconds if the response `Retry-After` header isn't present in the response headers, and defaults to a minimum wait time of - 1 second if Webex Teams returns a `Retry-After` header of 0 seconds. + 1 second if Webex returns a `Retry-After` header of 0 seconds. """ super(RateLimitError, self).__init__(response) class RateLimitWarning(ApiWarning, RateLimitError): - """Webex Teams rate-limit exceeded warning. + """Webex rate-limit exceeded warning. Raised when a rate-limit exceeded message is received and the request will be retried. @@ -168,7 +168,7 @@ class RateLimitWarning(ApiWarning, RateLimitError): pass -class MalformedResponse(webexteamssdkException): - """Raised when a malformed response is received from Webex Teams.""" +class MalformedResponse(webexpythonsdkException): + """Raised when a malformed response is received from Webex.""" pass diff --git a/src/webexpythonsdk/generator_containers.py b/src/webexpythonsdk/generator_containers.py index c8d00f8..ca21176 100644 --- a/src/webexpythonsdk/generator_containers.py +++ b/src/webexpythonsdk/generator_containers.py @@ -104,7 +104,7 @@ def __getitem__(self, item): `itertools.islice(GeneratorContainer, start, stop, step)` - This method attempts to optimize the Webex Teams request page size for + This method attempts to optimize the Webex request page size for slicing by setting the `max` parameter to the stop-value of the slice. If the sliced sequence can be returned in a single response, it will be. Otherwise automatic pagination will take care of returning enough diff --git a/src/webexpythonsdk/models/cards/__init__.py b/src/webexpythonsdk/models/cards/__init__.py index 30c991c..0295017 100644 --- a/src/webexpythonsdk/models/cards/__init__.py +++ b/src/webexpythonsdk/models/cards/__init__.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -"""Webex Teams Adaptive Cards data models. +"""Webex Adaptive Cards data models. Copyright (c) 2016-2024 Cisco and/or its affiliates. diff --git a/src/webexpythonsdk/models/cards/actions.py b/src/webexpythonsdk/models/cards/actions.py index 298d823..a6add0b 100644 --- a/src/webexpythonsdk/models/cards/actions.py +++ b/src/webexpythonsdk/models/cards/actions.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -"""Webex Teams Adaptive Card actions. +"""Webex Adaptive Card actions. Copyright (c) 2016-2024 Cisco and/or its affiliates. diff --git a/src/webexpythonsdk/models/cards/adaptive_card_component.py b/src/webexpythonsdk/models/cards/adaptive_card_component.py index c119bae..3918ba5 100644 --- a/src/webexpythonsdk/models/cards/adaptive_card_component.py +++ b/src/webexpythonsdk/models/cards/adaptive_card_component.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -"""Webex Teams Adaptive Card Component base class. +"""Webex Adaptive Card Component base class. Copyright (c) 2016-2024 Cisco and/or its affiliates. diff --git a/src/webexpythonsdk/models/cards/card.py b/src/webexpythonsdk/models/cards/card.py index 01cae96..b725593 100644 --- a/src/webexpythonsdk/models/cards/card.py +++ b/src/webexpythonsdk/models/cards/card.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -"""Webex Teams Adaptive Card data model. +"""Webex Adaptive Card data model. Copyright (c) 2016-2024 Cisco and/or its affiliates. @@ -30,7 +30,7 @@ class AdaptiveCard(AdaptiveCardComponent): """Adaptive Card data model. - Note: Webex Teams currently supports version 1.1 of adaptive cards and thus + Note: Webex currently supports version 1.1 of adaptive cards and thus only features from that release are supported in this abstraction. """ diff --git a/src/webexpythonsdk/models/cards/components.py b/src/webexpythonsdk/models/cards/components.py index 804bbf9..d5b4efe 100644 --- a/src/webexpythonsdk/models/cards/components.py +++ b/src/webexpythonsdk/models/cards/components.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -"""Webex Teams Adaptive Card components. +"""Webex Adaptive Card components. Copyright (c) 2016-2024 Cisco and/or its affiliates. diff --git a/src/webexpythonsdk/models/cards/container.py b/src/webexpythonsdk/models/cards/container.py index fae112c..ad6d2f3 100644 --- a/src/webexpythonsdk/models/cards/container.py +++ b/src/webexpythonsdk/models/cards/container.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -"""Webex Teams Adaptive Card container data models. +"""Webex Adaptive Card container data models. Copyright (c) 2016-2024 Cisco and/or its affiliates. diff --git a/src/webexpythonsdk/models/cards/inputs.py b/src/webexpythonsdk/models/cards/inputs.py index 441912d..6d62c6b 100644 --- a/src/webexpythonsdk/models/cards/inputs.py +++ b/src/webexpythonsdk/models/cards/inputs.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -"""Webex Teams Access-Tokens API wrapper. +"""Webex Access-Tokens API wrapper. Copyright (c) 2016-2024 Cisco and/or its affiliates. diff --git a/src/webexpythonsdk/models/cards/options.py b/src/webexpythonsdk/models/cards/options.py index f10d1e2..1d67b9f 100644 --- a/src/webexpythonsdk/models/cards/options.py +++ b/src/webexpythonsdk/models/cards/options.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -"""Webex Teams Adaptive Card options. +"""Webex Adaptive Card options. Copyright (c) 2016-2024 Cisco and/or its affiliates. diff --git a/src/webexpythonsdk/models/cards/utils.py b/src/webexpythonsdk/models/cards/utils.py index 60a7e44..284f573 100644 --- a/src/webexpythonsdk/models/cards/utils.py +++ b/src/webexpythonsdk/models/cards/utils.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -"""Webex Teams Access-Tokens API wrapper. +"""Webex Access-Tokens API wrapper. Copyright (c) 2016-2024 Cisco and/or its affiliates. diff --git a/src/webexpythonsdk/models/dictionary.py b/src/webexpythonsdk/models/dictionary.py index 8747882..a2ac0e6 100644 --- a/src/webexpythonsdk/models/dictionary.py +++ b/src/webexpythonsdk/models/dictionary.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -"""Webex Teams data models. +"""Webex data models. Copyright (c) 2016-2024 Cisco and/or its affiliates. @@ -29,7 +29,7 @@ unicode_literals, ) -from webexteamssdk.utils import json_dict +from webexpythonsdk.utils import json_dict def dict_data_factory(model, json_data): @@ -42,7 +42,7 @@ def dict_data_factory(model, json_data): which to initialize the object. Returns: - OrderedDict: An ordered dictionary with the contents of the Webex Teams + OrderedDict: An ordered dictionary with the contents of the Webex JSON object. Raises: diff --git a/src/webexpythonsdk/models/immutable.py b/src/webexpythonsdk/models/immutable.py index ac0131c..0a55946 100644 --- a/src/webexpythonsdk/models/immutable.py +++ b/src/webexpythonsdk/models/immutable.py @@ -1,8 +1,8 @@ # -*- coding: utf-8 -*- -"""Model Webex Teams JSON objects as native Python objects. +"""Model Webex JSON objects as native Python objects. Classes: - ImmutableData: Models Webex Teams JSON objects as native Python objects. + ImmutableData: Models Webex JSON objects as native Python objects. The ImmutableData class models any JSON object passed to it as a string or Python dictionary as a native Python object; providing attribute access using @@ -45,7 +45,7 @@ import json from collections import defaultdict -from webexteamssdk.utils import json_dict +from webexpythonsdk.utils import json_dict from .mixins.access_token import AccessTokenBasicPropertiesMixin from .mixins.admin_audit_event import ( AdminAuditEventBasicPropertiesMixin, @@ -76,7 +76,7 @@ class ImmutableData(object): - """Model a Webex Teams JSON object as an immutable native Python object.""" + """Model a Webex JSON object as an immutable native Python object.""" def __init__(self, json_data): """Init a new ImmutableData object from a dictionary or JSON string. @@ -128,7 +128,7 @@ def __str__(self): """A human-readable string representation of this object.""" class_str = self.__class__.__name__ json_str = json.dumps(self._json_data, indent=2) - return "Webex Teams {}:\n{}".format(class_str, json_str) + return "Webex {}:\n{}".format(class_str, json_str) def __repr__(self): """A string representing this object as valid Python expression.""" @@ -180,11 +180,11 @@ def json_data(self): return self._json_data.copy() def to_dict(self): - """Convert the Webex Teams object data to a dictionary.""" + """Convert the Webex object data to a dictionary.""" return dict(self._json_data) def to_json(self, **kwargs): - """Convert the Webex Teams object data to JSON. + """Convert the Webex object data to JSON. Any keyword arguments provided are passed through the Python JSON encoder. @@ -194,17 +194,17 @@ def to_json(self, **kwargs): class AccessToken(ImmutableData, AccessTokenBasicPropertiesMixin): - """Webex Teams Access-Token data model.""" + """Webex Access-Token data model.""" class AdminAuditEventData( ImmutableData, AdminAuditEventDataBasicPropertiesMixin ): - """Webex Teams Admin Audit Event Data object data model.""" + """Webex Admin Audit Event Data object data model.""" class AdminAuditEvent(ImmutableData, AdminAuditEventBasicPropertiesMixin): - """Webex Teams Admin Audit Event data model.""" + """Webex Admin Audit Event data model.""" @property def data(self): @@ -217,7 +217,7 @@ class AttachmentAction(ImmutableData, AttachmentActionBasicPropertiesMixin): class Event(ImmutableData, EventBasicPropertiesMixin): - """Webex Teams Event data model.""" + """Webex Event data model.""" @property def data(self): @@ -230,55 +230,55 @@ def data(self): class License(ImmutableData, LicenseBasicPropertiesMixin): - """Webex Teams License data model.""" + """Webex License data model.""" class Membership(ImmutableData, MembershipBasicPropertiesMixin): - """Webex Teams Membership data model.""" + """Webex Membership data model.""" class Message(ImmutableData, MessageBasicPropertiesMixin): - """Webex Teams Message data model.""" + """Webex Message data model.""" class Organization(ImmutableData, OrganizationBasicPropertiesMixin): - """Webex Teams Organization data model.""" + """Webex Organization data model.""" class Person(ImmutableData, PersonBasicPropertiesMixin): - """Webex Teams Person data model.""" + """Webex Person data model.""" class Role(ImmutableData, RoleBasicPropertiesMixin): - """Webex Teams Role data model.""" + """Webex Role data model.""" class Room(ImmutableData, RoomBasicPropertiesMixin): - """Webex Teams Room data model.""" + """Webex Room data model.""" class RoomTab(ImmutableData, RoomTabBasicPropertiesMixin): - """Webex Teams Room Tab data model.""" + """Webex Room Tab data model.""" class RoomMeetingInfo(ImmutableData, RoomMeetingInfoBasicPropertiesMixin): - """Webex Teams Room Meeting Info data model.""" + """Webex Room Meeting Info data model.""" class Team(ImmutableData, TeamBasicPropertiesMixin): - """Webex Teams Team data model.""" + """Webex Team data model.""" class TeamMembership(ImmutableData, TeamMembershipBasicPropertiesMixin): - """Webex Teams Team-Membership data model.""" + """Webex Team-Membership data model.""" class Webhook(ImmutableData, WebhookBasicPropertiesMixin): - """Webex Teams Webhook data model.""" + """Webex Webhook data model.""" class WebhookEvent(ImmutableData, WebhookEventBasicPropertiesMixin): - """Webex Teams Webhook-Events data model.""" + """Webex Webhook-Events data model.""" @property def data(self): @@ -287,11 +287,11 @@ def data(self): class GuestIssuerToken(ImmutableData, GuestIssuerTokenBasicPropertiesMixin): - """Webex Teams Guest Issuer Token data model""" + """Webex Guest Issuer Token data model""" class Recording(ImmutableData, RecordingBasicPropertiesMixin): - """Webex Teams Recording data model""" + """Webex Recording data model""" class Meeting(ImmutableData, MeetingBasicPropertiesMixin): diff --git a/src/webexpythonsdk/models/mixins/access_token.py b/src/webexpythonsdk/models/mixins/access_token.py index a32541a..657b4ad 100644 --- a/src/webexpythonsdk/models/mixins/access_token.py +++ b/src/webexpythonsdk/models/mixins/access_token.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -"""Webex Teams Access-Token data model. +"""Webex Access-Token data model. Copyright (c) 2016-2024 Cisco and/or its affiliates. @@ -37,7 +37,7 @@ class AccessTokenBasicPropertiesMixin(object): @property def access_token(self): - """Webex Teams access token.""" + """Webex access token.""" return self._json_data.get("access_token") @property diff --git a/src/webexpythonsdk/models/mixins/admin_audit_event.py b/src/webexpythonsdk/models/mixins/admin_audit_event.py index e0989fa..d9eefc3 100644 --- a/src/webexpythonsdk/models/mixins/admin_audit_event.py +++ b/src/webexpythonsdk/models/mixins/admin_audit_event.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -"""Webex Teams Webhook-Event data model. +"""Webex Webhook-Event data model. Copyright (c) 2016-2024 Cisco and/or its affiliates. @@ -31,7 +31,7 @@ from builtins import * -from webexteamssdk.utils import WebexTeamsDateTime +from webexpythonsdk.utils import WebexDateTime class AdminAuditEventDataBasicPropertiesMixin(object): @@ -136,6 +136,6 @@ def created(self): """The date and time the event took place.""" created = self._json_data.get("created") if created: - return WebexTeamsDateTime.strptime(created) + return WebexDateTime.strptime(created) else: return None diff --git a/src/webexpythonsdk/models/mixins/attachment_action.py b/src/webexpythonsdk/models/mixins/attachment_action.py index c19262e..34eaa32 100644 --- a/src/webexpythonsdk/models/mixins/attachment_action.py +++ b/src/webexpythonsdk/models/mixins/attachment_action.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -"""Webex Teams Message data model. +"""Webex Message data model. Copyright (c) 2016-2024 Cisco and/or its affiliates. @@ -31,7 +31,7 @@ from builtins import * -from webexteamssdk.utils import WebexTeamsDateTime +from webexpythonsdk.utils import WebexDateTime class AttachmentActionBasicPropertiesMixin(object): @@ -76,6 +76,6 @@ def created(self): """The date and time the action was created.""" created = self._json_data.get("created") if created: - return WebexTeamsDateTime.strptime(created) + return WebexDateTime.strptime(created) else: return None diff --git a/src/webexpythonsdk/models/mixins/event.py b/src/webexpythonsdk/models/mixins/event.py index 8146886..33a5426 100644 --- a/src/webexpythonsdk/models/mixins/event.py +++ b/src/webexpythonsdk/models/mixins/event.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -"""Webex Teams Event data model. +"""Webex Event data model. Copyright (c) 2016-2024 Cisco and/or its affiliates. @@ -31,7 +31,7 @@ from builtins import * -from webexteamssdk.utils import WebexTeamsDateTime +from webexpythonsdk.utils import WebexDateTime class EventBasicPropertiesMixin(object): @@ -83,6 +83,6 @@ def created(self): """The date and time of the event.""" created = self._json_data.get("created") if created: - return WebexTeamsDateTime.strptime(created) + return WebexDateTime.strptime(created) else: return None diff --git a/src/webexpythonsdk/models/mixins/guest_issuer_token.py b/src/webexpythonsdk/models/mixins/guest_issuer_token.py index 5812584..ac3624a 100644 --- a/src/webexpythonsdk/models/mixins/guest_issuer_token.py +++ b/src/webexpythonsdk/models/mixins/guest_issuer_token.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -"""Webex Teams Guest-Issuer data model. +"""Webex Guest-Issuer data model. Copyright (c) 2016-2024 Cisco and/or its affiliates. diff --git a/src/webexpythonsdk/models/mixins/license.py b/src/webexpythonsdk/models/mixins/license.py index 0ab203f..ae44443 100644 --- a/src/webexpythonsdk/models/mixins/license.py +++ b/src/webexpythonsdk/models/mixins/license.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -"""Webex Teams License data model. +"""Webex License data model. Copyright (c) 2016-2024 Cisco and/or its affiliates. diff --git a/src/webexpythonsdk/models/mixins/membership.py b/src/webexpythonsdk/models/mixins/membership.py index 57bb846..94b1ee5 100644 --- a/src/webexpythonsdk/models/mixins/membership.py +++ b/src/webexpythonsdk/models/mixins/membership.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -"""Webex Teams Membership data model. +"""Webex Membership data model. Copyright (c) 2016-2024 Cisco and/or its affiliates. @@ -33,7 +33,7 @@ import warnings -from webexteamssdk.utils import WebexTeamsDateTime +from webexpythonsdk.utils import WebexDateTime class MembershipBasicPropertiesMixin(object): @@ -89,6 +89,6 @@ def created(self): """The date and time when the membership was created.""" created = self._json_data.get("created") if created: - return WebexTeamsDateTime.strptime(created) + return WebexDateTime.strptime(created) else: return None diff --git a/src/webexpythonsdk/models/mixins/message.py b/src/webexpythonsdk/models/mixins/message.py index 9a74bae..33d2c35 100644 --- a/src/webexpythonsdk/models/mixins/message.py +++ b/src/webexpythonsdk/models/mixins/message.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -"""Webex Teams Message data model. +"""Webex Message data model. Copyright (c) 2016-2024 Cisco and/or its affiliates. @@ -31,7 +31,7 @@ from builtins import * -from webexteamssdk.utils import WebexTeamsDateTime +from webexpythonsdk.utils import WebexDateTime class MessageBasicPropertiesMixin(object): @@ -86,7 +86,7 @@ def markdown(self): def html(self): """The text content of the message, in HTML format. - This read-only property is used by the Webex Teams clients. + This read-only property is used by the Webex clients. """ return self._json_data.get("html") @@ -125,7 +125,7 @@ def created(self): """The date and time the message was created.""" created = self._json_data.get("created") if created: - return WebexTeamsDateTime.strptime(created) + return WebexDateTime.strptime(created) else: return None @@ -134,6 +134,6 @@ def updated(self): """The date and time the message was updated.""" updated = self._json_data.get("updated") if updated: - return WebexTeamsDateTime.strptime(updated) + return WebexDateTime.strptime(updated) else: return None diff --git a/src/webexpythonsdk/models/mixins/organization.py b/src/webexpythonsdk/models/mixins/organization.py index 8cd3c82..21d9630 100644 --- a/src/webexpythonsdk/models/mixins/organization.py +++ b/src/webexpythonsdk/models/mixins/organization.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -"""Webex Teams Organization data model. +"""Webex Organization data model. Copyright (c) 2016-2024 Cisco and/or its affiliates. @@ -31,7 +31,7 @@ from builtins import * -from webexteamssdk.utils import WebexTeamsDateTime +from webexpythonsdk.utils import WebexDateTime class OrganizationBasicPropertiesMixin(object): @@ -52,6 +52,6 @@ def created(self): """The date and time the organization was created.""" created = self._json_data.get("created") if created: - return WebexTeamsDateTime.strptime(created) + return WebexDateTime.strptime(created) else: return None diff --git a/src/webexpythonsdk/models/mixins/person.py b/src/webexpythonsdk/models/mixins/person.py index cb8f179..0ea01c7 100644 --- a/src/webexpythonsdk/models/mixins/person.py +++ b/src/webexpythonsdk/models/mixins/person.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -"""Webex Teams Person data model. +"""Webex Person data model. Copyright (c) 2016-2024 Cisco and/or its affiliates. @@ -31,7 +31,7 @@ from builtins import * -from webexteamssdk.utils import WebexTeamsDateTime +from webexpythonsdk.utils import WebexDateTime class PersonBasicPropertiesMixin(object): @@ -140,7 +140,7 @@ def created(self): """The date and time the person was created.""" created = self._json_data.get("created") if created: - return WebexTeamsDateTime.strptime(created) + return WebexDateTime.strptime(created) else: return None @@ -149,7 +149,7 @@ def lastModified(self): """The date and time the person was last changed.""" last_modified = self._json_data.get("lastModified") if last_modified: - return WebexTeamsDateTime.strptime(last_modified) + return WebexDateTime.strptime(last_modified) else: return None @@ -164,11 +164,10 @@ def timezone(self): @property def lastActivity(self): - """The date and time of the person"s last activity within Webex - Teams.""" + """The date and time of the person"s last activity within Webex.""" last_activity = self._json_data.get("lastActivity") if last_activity: - return WebexTeamsDateTime.strptime(last_activity) + return WebexDateTime.strptime(last_activity) else: return None @@ -225,7 +224,7 @@ def invitePending(self): activation. Person Invite Pending Enum: - `true`: The person has been invited to Webex Teams but has not + `true`: The person has been invited to Webex but has not created an account `false`: An invite is not pending for this person @@ -234,12 +233,12 @@ def invitePending(self): @property def loginEnabled(self): - """Whether or not the user is allowed to use Webex Teams. + """Whether or not the user is allowed to use Webex. Person Login Enabled Enum: - `true`: The person can log into Webex Teams + `true`: The person can log into Webex - "false": The person cannot log into Webex Teams + "false": The person cannot log into Webex """ return self._json_data.get("loginEnabled") diff --git a/src/webexpythonsdk/models/mixins/recording.py b/src/webexpythonsdk/models/mixins/recording.py index 8b73128..a66b111 100644 --- a/src/webexpythonsdk/models/mixins/recording.py +++ b/src/webexpythonsdk/models/mixins/recording.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -"""Webex Teams Recording data model. +"""Webex Recording data model. Copyright (c) 2016-2024 Cisco and/or its affiliates. @@ -31,7 +31,7 @@ from builtins import * -from webexteamssdk.utils import WebexTeamsDateTime +from webexpythonsdk.utils import WebexDateTime class RecordingBasicPropertiesMixin(object): @@ -82,14 +82,14 @@ def createTime(self): """ created = self._json_data.get("createTime") if created: - return WebexTeamsDateTime.strptime(created) + return WebexDateTime.strptime(created) @property def timeRecorded(self): """The date and time recording started in ISO 8601 compliant format.""" recorded = self._json_data.get("timeRecorded") if recorded: - return WebexTeamsDateTime.strptime(recorded) + return WebexDateTime.strptime(recorded) @property def siteUrl(self): diff --git a/src/webexpythonsdk/models/mixins/role.py b/src/webexpythonsdk/models/mixins/role.py index 83465a8..a55414d 100644 --- a/src/webexpythonsdk/models/mixins/role.py +++ b/src/webexpythonsdk/models/mixins/role.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -"""Webex Teams Role data model. +"""Webex Role data model. Copyright (c) 2016-2024 Cisco and/or its affiliates. diff --git a/src/webexpythonsdk/models/mixins/room.py b/src/webexpythonsdk/models/mixins/room.py index 6d01db2..825c9e4 100644 --- a/src/webexpythonsdk/models/mixins/room.py +++ b/src/webexpythonsdk/models/mixins/room.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -"""Webex Teams Room data model. +"""Webex Room data model. Copyright (c) 2016-2024 Cisco and/or its affiliates. @@ -31,7 +31,7 @@ from builtins import * -from webexteamssdk.utils import WebexTeamsDateTime +from webexpythonsdk.utils import WebexDateTime class RoomBasicPropertiesMixin(object): @@ -73,7 +73,7 @@ def lastActivity(self): """The date and time of the room"s last activity.""" last_activity = self._json_data.get("lastActivity") if last_activity: - return WebexTeamsDateTime.strptime(last_activity) + return WebexDateTime.strptime(last_activity) else: return None @@ -87,7 +87,7 @@ def created(self): """The date and time the room was created.""" created = self._json_data.get("created") if created: - return WebexTeamsDateTime.strptime(created) + return WebexDateTime.strptime(created) else: return None diff --git a/src/webexpythonsdk/models/mixins/room_meeting_info.py b/src/webexpythonsdk/models/mixins/room_meeting_info.py index 7a3aa3e..f636737 100644 --- a/src/webexpythonsdk/models/mixins/room_meeting_info.py +++ b/src/webexpythonsdk/models/mixins/room_meeting_info.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -"""Webex Teams Room Meeting Info data model. +"""Webex Room Meeting Info data model. Copyright (c) 2016-2024 Cisco and/or its affiliates. diff --git a/src/webexpythonsdk/models/mixins/room_tab.py b/src/webexpythonsdk/models/mixins/room_tab.py index 8116cf1..0aa9898 100644 --- a/src/webexpythonsdk/models/mixins/room_tab.py +++ b/src/webexpythonsdk/models/mixins/room_tab.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -"""Webex Teams Room data model. +"""Webex Room data model. Copyright (c) 2016-2024 Cisco and/or its affiliates. @@ -31,7 +31,7 @@ from builtins import * -from webexteamssdk.utils import WebexTeamsDateTime +from webexpythonsdk.utils import WebexDateTime class RoomTabBasicPropertiesMixin(object): @@ -62,6 +62,6 @@ def created(self): """The date and time when the Room Tab was created.""" created = self._json_data.get("created") if created: - return WebexTeamsDateTime.strptime(created) + return WebexDateTime.strptime(created) else: return None diff --git a/src/webexpythonsdk/models/mixins/team.py b/src/webexpythonsdk/models/mixins/team.py index 906767a..9006fcf 100644 --- a/src/webexpythonsdk/models/mixins/team.py +++ b/src/webexpythonsdk/models/mixins/team.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -"""Webex Teams Team data model. +"""Webex Team data model. Copyright (c) 2016-2024 Cisco and/or its affiliates. @@ -31,7 +31,7 @@ from builtins import * -from webexteamssdk.utils import WebexTeamsDateTime +from webexpythonsdk.utils import WebexDateTime class TeamBasicPropertiesMixin(object): @@ -57,6 +57,6 @@ def created(self): """The date and time the team was created.""" created = self._json_data.get("created") if created: - return WebexTeamsDateTime.strptime(created) + return WebexDateTime.strptime(created) else: return None diff --git a/src/webexpythonsdk/models/mixins/team_membership.py b/src/webexpythonsdk/models/mixins/team_membership.py index fcf2afd..1e8b272 100644 --- a/src/webexpythonsdk/models/mixins/team_membership.py +++ b/src/webexpythonsdk/models/mixins/team_membership.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -"""Webex Teams Team-Membership data model. +"""Webex Team-Membership data model. Copyright (c) 2016-2024 Cisco and/or its affiliates. @@ -31,7 +31,7 @@ from builtins import * -from webexteamssdk.utils import WebexTeamsDateTime +from webexpythonsdk.utils import WebexDateTime class TeamMembershipBasicPropertiesMixin(object): @@ -77,6 +77,6 @@ def created(self): """The date and time when the team membership was created.""" created = self._json_data.get("created") if created: - return WebexTeamsDateTime.strptime(created) + return WebexDateTime.strptime(created) else: return None diff --git a/src/webexpythonsdk/models/mixins/webhook.py b/src/webexpythonsdk/models/mixins/webhook.py index 670b82c..e5fbe91 100644 --- a/src/webexpythonsdk/models/mixins/webhook.py +++ b/src/webexpythonsdk/models/mixins/webhook.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -"""Webex Teams Webhook data model. +"""Webex Webhook data model. Copyright (c) 2016-2024 Cisco and/or its affiliates. @@ -31,7 +31,7 @@ from builtins import * -from webexteamssdk.utils import WebexTeamsDateTime +from webexpythonsdk.utils import WebexDateTime class WebhookBasicPropertiesMixin(object): @@ -134,6 +134,6 @@ def created(self): """The date and time the webhook was created.""" created = self._json_data.get("created") if created: - return WebexTeamsDateTime.strptime(created) + return WebexDateTime.strptime(created) else: return None diff --git a/src/webexpythonsdk/models/mixins/webhook_event.py b/src/webexpythonsdk/models/mixins/webhook_event.py index d56fb6a..52a6cf3 100644 --- a/src/webexpythonsdk/models/mixins/webhook_event.py +++ b/src/webexpythonsdk/models/mixins/webhook_event.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -"""Webex Teams Webhook-Event data model. +"""Webex Webhook-Event data model. Copyright (c) 2016-2024 Cisco and/or its affiliates. diff --git a/src/webexpythonsdk/models/simple.py b/src/webexpythonsdk/models/simple.py index 5de5473..b5d1ddb 100644 --- a/src/webexpythonsdk/models/simple.py +++ b/src/webexpythonsdk/models/simple.py @@ -1,8 +1,8 @@ # -*- coding: utf-8 -*- -"""Simple data model; models Webex Teams JSON objects as simple Python objects. +"""Simple data model; models Webex JSON objects as simple Python objects. Classes: - SimpleDataModel: Models Webex Teams JSON objects as simple Python objects. + SimpleDataModel: Models Webex JSON objects as simple Python objects. The SimpleDataModel class models any JSON object passed to it as a string or Python dictionary as a native Python object; providing attribute access using @@ -39,11 +39,11 @@ import json from builtins import * -from webexteamssdk.utils import json_dict +from webexpythonsdk.utils import json_dict class SimpleDataModel(object): - """Model a Webex Teams JSON object as a simple Python object.""" + """Model a Webex JSON object as a simple Python object.""" def __init__(self, json_data): """Init a new SimpleDataModel object from a dictionary or JSON string. diff --git a/src/webexpythonsdk/response_codes.py b/src/webexpythonsdk/response_codes.py index bc5315d..bad7b32 100644 --- a/src/webexpythonsdk/response_codes.py +++ b/src/webexpythonsdk/response_codes.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -"""Webex Teams Response Codes. +"""Webex Response Codes. Copyright (c) 2016-2024 Cisco and/or its affiliates. diff --git a/src/webexpythonsdk/restsession.py b/src/webexpythonsdk/restsession.py index 8274f89..46f0423 100644 --- a/src/webexpythonsdk/restsession.py +++ b/src/webexpythonsdk/restsession.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -"""RestSession class for creating connections to the Webex Teams APIs. +"""RestSession class for creating connections to the Webex APIs. Copyright (c) 2016-2024 Cisco and/or its affiliates. @@ -66,7 +66,7 @@ def _fix_next_url(next_url, params): """Remove max=null parameter from URL. - Patch for Webex Teams Defect: "next" URL returned in the Link headers of + Patch for Webex Defect: "next" URL returned in the Link headers of the responses contain an errant "max=null" parameter, which causes the next request (to this URL) to fail if the URL is requested as-is. @@ -99,7 +99,7 @@ def _fix_next_url(next_url, params): query_list.remove("max=null") warnings.warn( "`max=null` still present in next-URL returned " - "from Webex Teams", + "from Webex", RuntimeWarning, stacklevel=1, ) @@ -184,7 +184,7 @@ def user_agent(be_geo_id=None, caller=None): # Main module interface class RestSession(object): - """RESTful HTTP session class for making calls to the Webex Teams APIs.""" + """RESTful HTTP session class for making calls to the Webex APIs.""" def __init__( self, @@ -200,7 +200,7 @@ def __init__( """Initialize a new RestSession object. Args: - access_token(basestring): The Webex Teams access token to be used + access_token(basestring): The Webex access token to be used for this session. base_url(basestring): The base URL that will be suffixed onto API endpoint relative URLs to produce a callable absolute URL. @@ -265,7 +265,7 @@ def base_url(self): @property def access_token(self): - """The Webex Teams access token used for this session.""" + """The Webex access token used for this session.""" return self._access_token @property @@ -287,7 +287,7 @@ def wait_on_rate_limit(self): This setting enables or disables automatic rate-limit handling. When enabled, rate-limited requests will be automatically be retried after - waiting `Retry-After` seconds (provided by Webex Teams in the + waiting `Retry-After` seconds (provided by Webex in the rate-limit response header). """ @@ -338,24 +338,24 @@ def abs_url(self, url): return url def request(self, method, url, erc, **kwargs): - """Abstract base method for making requests to the Webex Teams APIs. + """Abstract base method for making requests to the Webex APIs. This base method: * Expands the API endpoint URL to an absolute URL * Makes the actual HTTP request to the API endpoint - * Provides support for Webex Teams rate-limiting + * Provides support for Webex rate-limiting * Inspects response codes and raises exceptions as appropriate Args: method(basestring): The request-method type ("GET", "POST", etc.). url(basestring): The URL of the API endpoint to be called. erc(int): The expected response code that should be returned by the - Webex Teams API endpoint to indicate success. + Webex API endpoint to indicate success. **kwargs: Passed on to the requests package. Raises: ApiError: If anything other than the expected response code is - returned by the Webex Teams API endpoint. + returned by the Webex API endpoint. """ # Ensure the url is an absolute URL @@ -396,7 +396,7 @@ def get(self, url, params=None, **kwargs): Raises: ApiError: If anything other than the expected response code is - returned by the Webex Teams API endpoint. + returned by the Webex API endpoint. """ check_type(url, basestring) @@ -422,7 +422,7 @@ def get_pages(self, url, params=None, **kwargs): Raises: ApiError: If anything other than the expected response code is - returned by the Webex Teams API endpoint. + returned by the Webex API endpoint. """ check_type(url, basestring) @@ -440,7 +440,7 @@ def get_pages(self, url, params=None, **kwargs): if response.links.get("next"): next_url = response.links.get("next").get("url") - # Patch for Webex Teams "max=null" in next URL bug + missing + # Patch for Webex "max=null" in next URL bug + missing # params, like mentionedPeople, which can be mandatory for # bots # Testing shows that patch is no longer needed; raising a @@ -457,7 +457,7 @@ def get_pages(self, url, params=None, **kwargs): def get_items(self, url, params=None, **kwargs): """Return a generator that GETs and yields individual JSON `items`. - Yields individual `items` from Webex Teams"s top-level {"items": [...]} + Yields individual `items` from Webex"s top-level {"items": [...]} JSON objects. Provides native support for RFC5988 Web Linking. The generator will request additional pages as needed until all items have been returned. @@ -471,7 +471,7 @@ def get_items(self, url, params=None, **kwargs): Raises: ApiError: If anything other than the expected response code is - returned by the Webex Teams API endpoint. + returned by the Webex API endpoint. MalformedResponse: If the returned response does not contain a top-level dictionary with an "items" key. @@ -509,7 +509,7 @@ def post(self, url, json=None, data=None, **kwargs): Raises: ApiError: If anything other than the expected response code is - returned by the Webex Teams API endpoint. + returned by the Webex API endpoint. """ check_type(url, basestring) @@ -535,7 +535,7 @@ def put(self, url, json=None, data=None, **kwargs): Raises: ApiError: If anything other than the expected response code is - returned by the Webex Teams API endpoint. + returned by the Webex API endpoint. """ check_type(url, basestring) @@ -559,7 +559,7 @@ def delete(self, url, **kwargs): Raises: ApiError: If anything other than the expected response code is - returned by the Webex Teams API endpoint. + returned by the Webex API endpoint. """ check_type(url, basestring) diff --git a/src/webexpythonsdk/utils.py b/src/webexpythonsdk/utils.py index b77176b..a3e55aa 100644 --- a/src/webexpythonsdk/utils.py +++ b/src/webexpythonsdk/utils.py @@ -46,7 +46,7 @@ from past.builtins import basestring -from .config import WEBEX_TEAMS_DATETIME_FORMAT +from .config import WEBEX_DATETIME_FORMAT from .exceptions import ( ApiError, RateLimitError, @@ -295,24 +295,24 @@ def dst(self, dt): return timedelta(0) -class WebexTeamsDateTime(datetime): - """Webex Teams formatted Python datetime.""" +class WebexDateTime(datetime): + """Webex formatted Python datetime.""" @classmethod - def strptime(cls, date_string, format=WEBEX_TEAMS_DATETIME_FORMAT): - """strptime with the Webex Teams DateTime format as the default.""" + def strptime(cls, date_string, format=WEBEX_DATETIME_FORMAT): + """strptime with the Webex DateTime format as the default.""" return ( - super(WebexTeamsDateTime, cls) + super(WebexDateTime, cls) .strptime(date_string, format) .replace(tzinfo=ZuluTimeZone()) ) - def strftime(self, fmt=WEBEX_TEAMS_DATETIME_FORMAT): - """strftime with the Webex Teams DateTime format as the default.""" - return super(WebexTeamsDateTime, self).strftime(fmt) + def strftime(self, fmt=WEBEX_DATETIME_FORMAT): + """strftime with the Webex DateTime format as the default.""" + return super(WebexDateTime, self).strftime(fmt) def __str__(self): - """Human readable string representation of this WebexTeamsDateTime.""" + """Human readable string representation of this WebexDateTime.""" if self.tzinfo: dt = self.astimezone(ZuluTimeZone()) else: diff --git a/tests/api/__init__.py b/tests/api/__init__.py index 3f49ea1..b3f244e 100644 --- a/tests/api/__init__.py +++ b/tests/api/__init__.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -"""WebexTeamsAPI fixtures and tests. +"""WebexAPI fixtures and tests. Copyright (c) 2016-2024 Cisco and/or its affiliates. @@ -27,27 +27,27 @@ import pytest import requests -import webexteamssdk -from webexteamssdk.api.access_tokens import AccessTokensAPI -from webexteamssdk.api.attachment_actions import AttachmentActionsAPI -from webexteamssdk.api.events import EventsAPI -from webexteamssdk.api.licenses import LicensesAPI -from webexteamssdk.api.memberships import MembershipsAPI -from webexteamssdk.api.messages import MessagesAPI -from webexteamssdk.api.organizations import OrganizationsAPI -from webexteamssdk.api.people import PeopleAPI -from webexteamssdk.api.roles import RolesAPI -from webexteamssdk.api.rooms import RoomsAPI -from webexteamssdk.api.team_memberships import TeamMembershipsAPI -from webexteamssdk.api.teams import TeamsAPI -from webexteamssdk.api.webhooks import WebhooksAPI -from webexteamssdk.config import ( +import webexpythonsdk +from webexpythonsdk.api.access_tokens import AccessTokensAPI +from webexpythonsdk.api.attachment_actions import AttachmentActionsAPI +from webexpythonsdk.api.events import EventsAPI +from webexpythonsdk.api.licenses import LicensesAPI +from webexpythonsdk.api.memberships import MembershipsAPI +from webexpythonsdk.api.messages import MessagesAPI +from webexpythonsdk.api.organizations import OrganizationsAPI +from webexpythonsdk.api.people import PeopleAPI +from webexpythonsdk.api.roles import RolesAPI +from webexpythonsdk.api.rooms import RoomsAPI +from webexpythonsdk.api.team_memberships import TeamMembershipsAPI +from webexpythonsdk.api.teams import TeamsAPI +from webexpythonsdk.api.webhooks import WebhooksAPI +from webexpythonsdk.config import ( ACCESS_TOKEN_ENVIRONMENT_VARIABLE, DEFAULT_BASE_URL, DEFAULT_SINGLE_REQUEST_TIMEOUT, DEFAULT_WAIT_ON_RATE_LIMIT, ) -from webexteamssdk.api.recordings import RecordingsAPI +from webexpythonsdk.api.recordings import RecordingsAPI # Constants @@ -80,47 +80,47 @@ def unset_access_token(access_token): @pytest.fixture(scope="session") def api(access_token): - return webexteamssdk.WebexTeamsAPI(access_token=access_token) + return webexpythonsdk.WebexAPI(access_token=access_token) # Tests -# Test creating WebexTeamsAPI objects +# Test creating WebexAPI objects @pytest.mark.usefixtures("unset_access_token") def test_create_without_an_access_token(): - with pytest.raises(webexteamssdk.AccessTokenError): - webexteamssdk.WebexTeamsAPI() + with pytest.raises(webexpythonsdk.AccessTokenError): + webexpythonsdk.WebexAPI() def test_create_with_access_token_environment_variable(): - connection_object = webexteamssdk.WebexTeamsAPI() - assert isinstance(connection_object, webexteamssdk.WebexTeamsAPI) + connection_object = webexpythonsdk.WebexAPI() + assert isinstance(connection_object, webexpythonsdk.WebexAPI) @pytest.mark.usefixtures("unset_access_token") def test_create_with_access_token_argument(access_token): - connection_object = webexteamssdk.WebexTeamsAPI(access_token=access_token) - assert isinstance(connection_object, webexteamssdk.WebexTeamsAPI) + connection_object = webexpythonsdk.WebexAPI(access_token=access_token) + assert isinstance(connection_object, webexpythonsdk.WebexAPI) @pytest.mark.usefixtures("access_token") def test_default_base_url(): - connection_object = webexteamssdk.WebexTeamsAPI() + connection_object = webexpythonsdk.WebexAPI() assert connection_object.base_url == DEFAULT_BASE_URL @pytest.mark.usefixtures("access_token") def test_custom_base_url(): custom_url = "https://custom.domain.com/v1/" - connection_object = webexteamssdk.WebexTeamsAPI(base_url=custom_url) + connection_object = webexpythonsdk.WebexAPI(base_url=custom_url) assert connection_object.base_url == custom_url @pytest.mark.usefixtures("access_token") def test_default_single_request_timeout(): - connection_object = webexteamssdk.WebexTeamsAPI() + connection_object = webexpythonsdk.WebexAPI() assert ( connection_object.single_request_timeout == DEFAULT_SINGLE_REQUEST_TIMEOUT @@ -130,7 +130,7 @@ def test_default_single_request_timeout(): @pytest.mark.usefixtures("access_token") def test_custom_single_request_timeout(): custom_timeout = 10 - connection_object = webexteamssdk.WebexTeamsAPI( + connection_object = webexpythonsdk.WebexAPI( single_request_timeout=custom_timeout ) assert connection_object.single_request_timeout == custom_timeout @@ -138,13 +138,13 @@ def test_custom_single_request_timeout(): @pytest.mark.usefixtures("access_token") def test_default_wait_on_rate_limit(): - connection_object = webexteamssdk.WebexTeamsAPI() + connection_object = webexpythonsdk.WebexAPI() assert connection_object.wait_on_rate_limit == DEFAULT_WAIT_ON_RATE_LIMIT @pytest.mark.usefixtures("access_token") def test_non_default_wait_on_rate_limit(): - connection_object = webexteamssdk.WebexTeamsAPI( + connection_object = webexpythonsdk.WebexAPI( wait_on_rate_limit=not DEFAULT_WAIT_ON_RATE_LIMIT ) assert connection_object.wait_on_rate_limit != DEFAULT_WAIT_ON_RATE_LIMIT diff --git a/tests/api/test_admin_audit_events.py b/tests/api/test_admin_audit_events.py index 87a5710..906af42 100644 --- a/tests/api/test_admin_audit_events.py +++ b/tests/api/test_admin_audit_events.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -"""WebexTeamsAPI Admin Audit Events API fixtures and tests. +"""WebexAPI Admin Audit Events API fixtures and tests. Copyright (c) 2016-2024 Cisco and/or its affiliates. @@ -27,10 +27,10 @@ import pytest -import webexteamssdk +import webexpythonsdk -to_datetime = webexteamssdk.WebexTeamsDateTime.now(tz=timezone.utc) +to_datetime = webexpythonsdk.WebexDateTime.now(tz=timezone.utc) from_datetime = to_datetime - timedelta(days=364) @@ -39,7 +39,7 @@ def is_valid_admin_audit_event(obj): return ( - isinstance(obj, webexteamssdk.AdminAuditEvent) and obj.id is not None + isinstance(obj, webexpythonsdk.AdminAuditEvent) and obj.id is not None ) diff --git a/tests/api/test_attachment_actions.py b/tests/api/test_attachment_actions.py index 2da38b8..04d09f2 100644 --- a/tests/api/test_attachment_actions.py +++ b/tests/api/test_attachment_actions.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -"""WebexTeamsAPI Messages API fixtures and tests. +"""WebexAPI Messages API fixtures and tests. Copyright (c) 2016-2024 Cisco and/or its affiliates. @@ -27,7 +27,7 @@ import pytest -import webexteamssdk +import webexpythonsdk from tests.utils import create_string @@ -40,7 +40,7 @@ # Helper Functions def is_valid_attachment_action(obj): return ( - isinstance(obj, webexteamssdk.AttachmentAction) and obj.id is not None + isinstance(obj, webexpythonsdk.AttachmentAction) and obj.id is not None ) diff --git a/tests/api/test_events.py b/tests/api/test_events.py index 8fd3919..943630f 100644 --- a/tests/api/test_events.py +++ b/tests/api/test_events.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -"""WebexTeamsAPI Events API fixtures and tests. +"""WebexAPI Events API fixtures and tests. Copyright (c) 2016-2024 Cisco and/or its affiliates. @@ -26,14 +26,14 @@ import pytest -import webexteamssdk +import webexpythonsdk # Helper Functions def is_valid_event(obj): - return isinstance(obj, webexteamssdk.Event) and obj.id is not None + return isinstance(obj, webexpythonsdk.Event) and obj.id is not None def are_valid_events(iterable): diff --git a/tests/api/test_guest_issuer.py b/tests/api/test_guest_issuer.py index df27632..ba50367 100644 --- a/tests/api/test_guest_issuer.py +++ b/tests/api/test_guest_issuer.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -"""WebexTeamsAPI Licenses API fixtures and tests. +"""WebexAPI Licenses API fixtures and tests. Copyright (c) 2016-2024 Cisco and/or its affiliates. @@ -26,19 +26,19 @@ import time import pytest -import webexteamssdk +import webexpythonsdk TOKEN_EXPIRATION_SECONDS = 60 * 5 -WEBEX_TEAMS_GUEST_ISSUER_ID = os.environ.get("WEBEX_TEAMS_GUEST_ISSUER_ID") -WEBEX_TEAMS_GUEST_ISSUER_SECRET = os.environ.get( - "WEBEX_TEAMS_GUEST_ISSUER_SECRET" +WEBEX_GUEST_ISSUER_ID = os.environ.get("WEBEX_GUEST_ISSUER_ID") +WEBEX_GUEST_ISSUER_SECRET = os.environ.get( + "WEBEX_GUEST_ISSUER_SECRET" ) -if WEBEX_TEAMS_GUEST_ISSUER_ID is None or not WEBEX_TEAMS_GUEST_ISSUER_SECRET: +if WEBEX_GUEST_ISSUER_ID is None or not WEBEX_GUEST_ISSUER_SECRET: pytest.skip( - "Required WEBEX_TEAMS_GUEST_ISSUER_ID and/or " - "WEBEX_TEAMS_GUEST_ISSUER_SECRET environment variables are not set.", + "Required WEBEX_GUEST_ISSUER_ID and/or " + "WEBEX_GUEST_ISSUER_SECRET environment variables are not set.", allow_module_level=True, ) @@ -48,7 +48,7 @@ def is_valid_guest_issuer_token(obj): return ( - isinstance(obj, webexteamssdk.GuestIssuerToken) + isinstance(obj, webexpythonsdk.GuestIssuerToken) and obj.token is not None ) @@ -60,9 +60,9 @@ def test_get_guest_issuer_token(api): guest_issuer_token = api.guest_issuer.create( sub="test-guest-user", name="Test Guest User", - iss=WEBEX_TEAMS_GUEST_ISSUER_ID, + iss=WEBEX_GUEST_ISSUER_ID, exp=str(int(time.time()) + TOKEN_EXPIRATION_SECONDS), - secret=WEBEX_TEAMS_GUEST_ISSUER_SECRET, + secret=WEBEX_GUEST_ISSUER_SECRET, ) assert is_valid_guest_issuer_token(guest_issuer_token) diff --git a/tests/api/test_licenses.py b/tests/api/test_licenses.py index 82a5e44..cedf187 100644 --- a/tests/api/test_licenses.py +++ b/tests/api/test_licenses.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -"""WebexTeamsAPI Licenses API fixtures and tests. +"""WebexAPI Licenses API fixtures and tests. Copyright (c) 2016-2024 Cisco and/or its affiliates. @@ -24,14 +24,14 @@ import pytest -import webexteamssdk +import webexpythonsdk # Helper Functions def is_valid_license(obj): - return isinstance(obj, webexteamssdk.License) and obj.id is not None + return isinstance(obj, webexpythonsdk.License) and obj.id is not None def are_valid_licenses(iterable): diff --git a/tests/api/test_meeting_registrants.py b/tests/api/test_meeting_registrants.py index d125352..e5aca17 100644 --- a/tests/api/test_meeting_registrants.py +++ b/tests/api/test_meeting_registrants.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -"""WebexTeamsAPI MeetingRegistrants API fixtures and tests. +"""WebexAPI MeetingRegistrants API fixtures and tests. Copyright (c) 2016-2024 Cisco and/or its affiliates. @@ -25,7 +25,7 @@ import pytest import datetime -import webexteamssdk +import webexpythonsdk from tests.utils import create_string @@ -34,7 +34,7 @@ def is_valid_registrant(obj): return ( - isinstance(obj, webexteamssdk.MeetingRegistrant) and obj.id is not None + isinstance(obj, webexpythonsdk.MeetingRegistrant) and obj.id is not None ) @@ -62,7 +62,7 @@ def meeting(api): try: api.meetings.delete(meeting.id) - except webexteamssdk.ApiError: + except webexpythonsdk.ApiError: pass @@ -84,7 +84,7 @@ def webinar(api): try: api.meetings.delete(webinar.id) - except webexteamssdk.ApiError: + except webexpythonsdk.ApiError: pass @@ -101,7 +101,7 @@ def registrant(api, webinar): try: api.meeting_registrants.delete(webinar.id, registrant.id) - except webexteamssdk.ApiError: + except webexpythonsdk.ApiError: pass @@ -110,7 +110,7 @@ def registrant(api, webinar): def test_register_for_meeting(api, meeting): # it is expected that registration does not work for a plain meeting - with pytest.raises(webexteamssdk.ApiError) as ex_info: + with pytest.raises(webexpythonsdk.ApiError) as ex_info: api.meeting_registrants.create( meeting.id, firstName=create_string("FirstName"), diff --git a/tests/api/test_meetings.py b/tests/api/test_meetings.py index 09e795c..ed7216b 100644 --- a/tests/api/test_meetings.py +++ b/tests/api/test_meetings.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -"""WebexTeamsAPI Meetings API fixtures and tests. +"""WebexAPI Meetings API fixtures and tests. Copyright (c) 2016-2024 Cisco and/or its affiliates. @@ -25,7 +25,7 @@ import pytest import datetime -import webexteamssdk +import webexpythonsdk from tests.utils import create_string @@ -33,7 +33,7 @@ def is_valid_meeting(obj): - return isinstance(obj, webexteamssdk.Meeting) and obj.id is not None + return isinstance(obj, webexpythonsdk.Meeting) and obj.id is not None def get_start_end_time(): @@ -60,7 +60,7 @@ def meeting(api): try: api.meetings.delete(meeting.id) - except webexteamssdk.ApiError: + except webexpythonsdk.ApiError: pass @@ -76,7 +76,7 @@ def webinar(api): try: api.meetings.delete(webinar.id) - except webexteamssdk.ApiError: + except webexpythonsdk.ApiError: pass diff --git a/tests/api/test_memberships.py b/tests/api/test_memberships.py index 33c5a91..a038be8 100644 --- a/tests/api/test_memberships.py +++ b/tests/api/test_memberships.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -"""WebexTeamsAPI Memberships API fixtures and tests. +"""WebexAPI Memberships API fixtures and tests. Copyright (c) 2016-2024 Cisco and/or its affiliates. @@ -26,7 +26,7 @@ import pytest -import webexteamssdk +import webexpythonsdk # Helper Functions @@ -34,7 +34,7 @@ def is_valid_membership(membership): return ( - isinstance(membership, webexteamssdk.Membership) + isinstance(membership, webexpythonsdk.Membership) and membership.id is not None ) diff --git a/tests/api/test_messages.py b/tests/api/test_messages.py index c1b4426..37f6b9f 100644 --- a/tests/api/test_messages.py +++ b/tests/api/test_messages.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -"""WebexTeamsAPI Messages API fixtures and tests. +"""WebexAPI Messages API fixtures and tests. Copyright (c) 2016-2024 Cisco and/or its affiliates. @@ -28,8 +28,8 @@ import pytest -import webexteamssdk -from tests.environment import WEBEX_TEAMS_TEST_FILE_URL +import webexpythonsdk +from tests.environment import WEBEX_TEST_FILE_URL from tests.utils import create_string @@ -41,7 +41,7 @@ # Helper Functions def is_valid_message(obj): - return isinstance(obj, webexteamssdk.Message) and obj.id is not None + return isinstance(obj, webexpythonsdk.Message) and obj.id is not None def are_valid_messages(iterable): @@ -135,7 +135,7 @@ def inner_function(room_id, **message_attributes): for message in messages: try: api.messages.delete(message.id) - except webexteamssdk.ApiError: + except webexpythonsdk.ApiError: pass @@ -176,7 +176,7 @@ def group_room_markdown_message( def group_room_message_with_file_by_url(group_room, send_group_room_message): text = "File posted via URL" return send_group_room_message( - room_id=group_room.id, text=text, files=[WEBEX_TEAMS_TEST_FILE_URL] + room_id=group_room.id, text=text, files=[WEBEX_TEST_FILE_URL] ) diff --git a/tests/api/test_organizations.py b/tests/api/test_organizations.py index a4966a9..94bec38 100644 --- a/tests/api/test_organizations.py +++ b/tests/api/test_organizations.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -"""WebexTeamsAPI Organizations API fixtures and tests. +"""WebexAPI Organizations API fixtures and tests. Copyright (c) 2016-2024 Cisco and/or its affiliates. @@ -24,14 +24,14 @@ import pytest -import webexteamssdk +import webexpythonsdk # Helper Functions def is_valid_organization(obj): - return isinstance(obj, webexteamssdk.Organization) and obj.id is not None + return isinstance(obj, webexpythonsdk.Organization) and obj.id is not None def are_valid_organizations(iterable): diff --git a/tests/api/test_people.py b/tests/api/test_people.py index a118a00..6c3c539 100644 --- a/tests/api/test_people.py +++ b/tests/api/test_people.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -"""WebexTeamsAPI People API fixtures and tests. +"""WebexAPI People API fixtures and tests. Copyright (c) 2016-2024 Cisco and/or its affiliates. @@ -26,7 +26,7 @@ import pytest -import webexteamssdk +import webexpythonsdk # Helper Functions @@ -53,7 +53,7 @@ def update_person(api, person, **person_attributes): def is_valid_person(obj): - return isinstance(obj, webexteamssdk.Person) and obj.id is not None + return isinstance(obj, webexpythonsdk.Person) and obj.id is not None def are_valid_people(iterable): @@ -78,9 +78,9 @@ def inner_function(): else: person = api.people.create( emails=[person_email], - displayName="webexteamssdk", - firstName="webexteamssdk", - lastName="webexteamssdk", + displayName="webexpythonsdk", + firstName="webexpythonsdk", + lastName="webexpythonsdk", orgId=me.orgId, licenses=[licenses_dict["Advanced Messaging"].id], callingData=True, @@ -142,7 +142,7 @@ def test_people(api, get_test_person): @pytest.fixture() def temp_person(api, get_random_email_address, me, licenses_dict): - # Get an e-mail address not currently used on Webex Teams + # Get an e-mail address not currently used on Webex person_email = None person = True while person: @@ -152,9 +152,9 @@ def temp_person(api, get_random_email_address, me, licenses_dict): # Create the person person = api.people.create( emails=[person_email], - displayName="webexteamssdk", - firstName="webexteamssdk", - lastName="webexteamssdk", + displayName="webexpythonsdk", + firstName="webexpythonsdk", + lastName="webexpythonsdk", orgId=me.orgId, licenses=[licenses_dict["Advanced Messaging"].id], ) @@ -163,7 +163,7 @@ def temp_person(api, get_random_email_address, me, licenses_dict): try: api.people.delete(person.id) - except webexteamssdk.ApiError: + except webexpythonsdk.ApiError: pass diff --git a/tests/api/test_recordings.py b/tests/api/test_recordings.py index fc58971..6899733 100644 --- a/tests/api/test_recordings.py +++ b/tests/api/test_recordings.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -"""WebexTeamsAPI Recordings API fixtures and tests. +"""WebexAPI Recordings API fixtures and tests. Copyright (c) 2016-2024 Cisco and/or its affiliates. @@ -28,15 +28,15 @@ import pytest -import webexteamssdk +import webexpythonsdk -to_datetime = webexteamssdk.WebexTeamsDateTime.now(tz=timezone.utc) +to_datetime = webexpythonsdk.WebexDateTime.now(tz=timezone.utc) from_datetime = to_datetime - timedelta(days=364) # Helper Functions def is_valid_recording(obj): - return isinstance(obj, webexteamssdk.Recording) and obj.id is not None + return isinstance(obj, webexpythonsdk.Recording) and obj.id is not None def are_valid_recording(iterable): diff --git a/tests/api/test_roles.py b/tests/api/test_roles.py index 097fbee..c1905db 100644 --- a/tests/api/test_roles.py +++ b/tests/api/test_roles.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -"""WebexTeamsAPI Roles API fixtures and tests. +"""WebexAPI Roles API fixtures and tests. Copyright (c) 2016-2024 Cisco and/or its affiliates. @@ -24,14 +24,14 @@ import pytest -import webexteamssdk +import webexpythonsdk # Helper Functions def is_valid_role(obj): - return isinstance(obj, webexteamssdk.Role) and obj.id is not None + return isinstance(obj, webexpythonsdk.Role) and obj.id is not None def are_valid_roles(iterable): diff --git a/tests/api/test_room_tabs.py b/tests/api/test_room_tabs.py index 609efa1..4535568 100644 --- a/tests/api/test_room_tabs.py +++ b/tests/api/test_room_tabs.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -"""WebexTeamsAPI Rooms API fixtures and tests. +"""WebexAPI Rooms API fixtures and tests. Copyright (c) 2016-2024 Cisco and/or its affiliates. @@ -27,14 +27,14 @@ import pytest -import webexteamssdk +import webexpythonsdk from tests.utils import create_string -WEBEX_TEAMS_TEST_FILE_URL = os.environ.get("WEBEX_TEAMS_TEST_FILE_URL") +WEBEX_TEST_FILE_URL = os.environ.get("WEBEX_TEST_FILE_URL") -if not WEBEX_TEAMS_TEST_FILE_URL: +if not WEBEX_TEST_FILE_URL: pytest.skip( - "WEBEX_TEAMS_TEST_FILE_URL environment variable is not set.", + "WEBEX_TEST_FILE_URL environment variable is not set.", allow_module_level=True, ) @@ -43,7 +43,7 @@ def is_valid_room_tab(obj): - return isinstance(obj, webexteamssdk.RoomTab) and obj.id is not None + return isinstance(obj, webexpythonsdk.RoomTab) and obj.id is not None def are_valid_room_tabs(iterable): @@ -55,7 +55,7 @@ def are_valid_room_tabs(iterable): def room_tab(api, group_room): room_tab = api.room_tabs.create( roomId=group_room.id, - contentUrl=WEBEX_TEAMS_TEST_FILE_URL, + contentUrl=WEBEX_TEST_FILE_URL, displayName=create_string("RoomTab"), ) @@ -68,7 +68,7 @@ def room_tab(api, group_room): def temp_room_tab(api, group_room): temp_room_tab = api.room_tabs.create( roomId=group_room.id, - contentUrl=WEBEX_TEAMS_TEST_FILE_URL, + contentUrl=WEBEX_TEST_FILE_URL, displayName=create_string("RoomTab"), ) @@ -76,7 +76,7 @@ def temp_room_tab(api, group_room): try: api.room_tabs.delete(temp_room_tab.id) - except webexteamssdk.ApiError: + except webexpythonsdk.ApiError: pass diff --git a/tests/api/test_rooms.py b/tests/api/test_rooms.py index 1256260..10b822e 100644 --- a/tests/api/test_rooms.py +++ b/tests/api/test_rooms.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -"""WebexTeamsAPI Rooms API fixtures and tests. +"""WebexAPI Rooms API fixtures and tests. Copyright (c) 2016-2024 Cisco and/or its affiliates. @@ -26,7 +26,7 @@ import pytest -import webexteamssdk +import webexpythonsdk from tests.utils import create_string @@ -34,12 +34,12 @@ def is_valid_room(obj): - return isinstance(obj, webexteamssdk.Room) and obj.id is not None + return isinstance(obj, webexpythonsdk.Room) and obj.id is not None def is_valid_room_meeting_info(obj): return ( - isinstance(obj, webexteamssdk.RoomMeetingInfo) + isinstance(obj, webexpythonsdk.RoomMeetingInfo) and obj.roomId is not None ) @@ -102,7 +102,7 @@ def temp_room(api): try: api.rooms.delete(room.id) - except webexteamssdk.ApiError: + except webexpythonsdk.ApiError: pass @@ -120,7 +120,7 @@ def inner(num_rooms): for room in rooms: try: api.rooms.delete(room.id) - except webexteamssdk.ApiError: + except webexpythonsdk.ApiError: pass diff --git a/tests/api/test_teammemberships.py b/tests/api/test_teammemberships.py index 694014a..58c8b3a 100644 --- a/tests/api/test_teammemberships.py +++ b/tests/api/test_teammemberships.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -"""WebexTeamsAPI Team Memberships API fixtures and tests. +"""WebexAPI Team Memberships API fixtures and tests. Copyright (c) 2016-2024 Cisco and/or its affiliates. @@ -26,7 +26,7 @@ import pytest -import webexteamssdk +import webexpythonsdk # Helper Functions @@ -34,7 +34,7 @@ def is_valid_team_membership(membership): return ( - isinstance(membership, webexteamssdk.TeamMembership) + isinstance(membership, webexpythonsdk.TeamMembership) and membership.id is not None ) diff --git a/tests/api/test_teams.py b/tests/api/test_teams.py index 0aceaff..16a91d7 100644 --- a/tests/api/test_teams.py +++ b/tests/api/test_teams.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -"""WebexTeamsAPI Team API fixtures and tests. +"""WebexAPI Team API fixtures and tests. Copyright (c) 2016-2024 Cisco and/or its affiliates. @@ -26,7 +26,7 @@ import pytest -import webexteamssdk +import webexpythonsdk from tests.utils import create_string @@ -34,7 +34,7 @@ def is_valid_team(obj): - return isinstance(obj, webexteamssdk.Team) and obj.id is not None + return isinstance(obj, webexpythonsdk.Team) and obj.id is not None def are_valid_teams(iterable): @@ -66,7 +66,7 @@ def temp_team(api): try: api.teams.delete(team.id) - except webexteamssdk.ApiError: + except webexpythonsdk.ApiError: pass @@ -84,7 +84,7 @@ def inner(num_teams): for team in teams: try: api.teams.delete(team.id) - except webexteamssdk.ApiError: + except webexpythonsdk.ApiError: pass diff --git a/tests/conftest.py b/tests/conftest.py index b88d9a2..04e4de8 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -30,15 +30,15 @@ import pytest from tests.environment import ( - WEBEX_TEAMS_TEST_DOMAIN, - WEBEX_TEAMS_TEST_FILE_URL, - WEBEX_TEAMS_TEST_ID_START, + WEBEX_TEST_DOMAIN, + WEBEX_TEST_FILE_URL, + WEBEX_TEST_ID_START, ) from tests.utils import download_file pytest_plugins = [ - "tests.test_webexteamssdk", + "tests.test_webexpythonsdk", "tests.api", "tests.api.test_attachment_actions", "tests.api.test_licenses", @@ -54,12 +54,12 @@ "tests.api.test_recordings", ] -email_template = string.Template("test${number}@" + WEBEX_TEAMS_TEST_DOMAIN) +email_template = string.Template("test${number}@" + WEBEX_TEST_DOMAIN) # Helper Functions def new_email_generator(): - i = WEBEX_TEAMS_TEST_ID_START + i = WEBEX_TEST_ID_START while True: email_address = email_template.substitute(number=i) i += 1 @@ -80,7 +80,7 @@ def temp_directory(): @pytest.fixture(scope="session") def local_file(temp_directory): - file = download_file(WEBEX_TEAMS_TEST_FILE_URL, temp_directory) + file = download_file(WEBEX_TEST_FILE_URL, temp_directory) yield file diff --git a/tests/environment.py b/tests/environment.py index 8d818bd..78cc9d6 100644 --- a/tests/environment.py +++ b/tests/environment.py @@ -26,35 +26,35 @@ import string -WEBEX_TEAMS_TEST_DOMAIN = os.getenv("WEBEX_TEAMS_TEST_DOMAIN") -if WEBEX_TEAMS_TEST_DOMAIN is None: +WEBEX_TEST_DOMAIN = os.getenv("WEBEX_TEST_DOMAIN") +if WEBEX_TEST_DOMAIN is None: raise RuntimeError( "You must set a {} environment variable to run the test suite" - "".format("WEBEX_TEAMS_TEST_DOMAIN") + "".format("WEBEX_TEST_DOMAIN") ) -WEBEX_TEAMS_TEST_ID_START = int(os.getenv("WEBEX_TEAMS_TEST_ID_START")) -if WEBEX_TEAMS_TEST_ID_START is None: +WEBEX_TEST_ID_START = int(os.getenv("WEBEX_TEST_ID_START")) +if WEBEX_TEST_ID_START is None: raise RuntimeError( "You must set a {} environment variable to run the test suite" - "".format("WEBEX_TEAMS_TEST_ID_START") + "".format("WEBEX_TEST_ID_START") ) -WEBEX_TEAMS_TEST_FILE_URL = os.getenv("WEBEX_TEAMS_TEST_FILE_URL") -if WEBEX_TEAMS_TEST_FILE_URL is None: +WEBEX_TEST_FILE_URL = os.getenv("WEBEX_TEST_FILE_URL") +if WEBEX_TEST_FILE_URL is None: raise RuntimeError( "You must set a {} environment variable to run the test suite" - "".format("WEBEX_TEAMS_TEST_FILE_URL") + "".format("WEBEX_TEST_FILE_URL") ) -WEBEX_TEAMS_TEST_STRING_PREFIX = os.getenv( - "WEBEX_TEAMS_TEST_STRING_PREFIX", - default="webexteamssdk pytest", +WEBEX_TEST_STRING_PREFIX = os.getenv( + "WEBEX_TEST_STRING_PREFIX", + default="webexpythonsdk pytest", ) -WEBEX_TEAMS_TEST_STRING_TEMPLATE = string.Template( +WEBEX_TEST_STRING_TEMPLATE = string.Template( os.getenv( - "WEBEX_TEAMS_TEST_STRING_TEMPLATE", + "WEBEX_TEST_STRING_TEMPLATE", default="$prefix $item [$datetime]", ) ) diff --git a/tests/test_restsession.py b/tests/test_restsession.py index 2aa748c..12e9124 100644 --- a/tests/test_restsession.py +++ b/tests/test_restsession.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -"""webexteamssdk/restsession.py Fixtures & Tests +"""webexpythonsdk/restsession.py Fixtures & Tests Copyright (c) 2016-2024 Cisco and/or its affiliates. @@ -27,7 +27,7 @@ import pytest -import webexteamssdk +import webexpythonsdk logging.captureWarnings(True) @@ -37,7 +37,7 @@ def rate_limit_detected(w): """Check to see if a rate-limit warning is in the warnings list.""" while w: - if issubclass(w.pop().category, webexteamssdk.RateLimitWarning): + if issubclass(w.pop().category, webexpythonsdk.RateLimitWarning): return True return False diff --git a/tests/test_webexteamssdk.py b/tests/test_webexteamssdk.py index 1637ee1..c0c3dcd 100644 --- a/tests/test_webexteamssdk.py +++ b/tests/test_webexteamssdk.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -"""Test suite for the community-developed Python SDK for the Webex Teams APIs. +"""Test suite for the community-developed Python SDK for the Webex APIs. Copyright (c) 2016-2024 Cisco and/or its affiliates. @@ -22,41 +22,41 @@ SOFTWARE. """ -import webexteamssdk +import webexpythonsdk -class TestWebexTeamsSDK: +class TestWebexPythonSDK: """Test the package-level code.""" def test_package_contents(self): """Ensure the package contains the correct top-level objects.""" - # Webex Teams API Wrapper - assert hasattr(webexteamssdk, "WebexTeamsAPI") + # Webex API Wrapper + assert hasattr(webexpythonsdk, "WebexAPI") # Exceptions - assert hasattr(webexteamssdk, "ApiError") - assert hasattr(webexteamssdk, "AccessTokenError") - assert hasattr(webexteamssdk, "RateLimitError") - assert hasattr(webexteamssdk, "RateLimitWarning") - assert hasattr(webexteamssdk, "webexteamssdkException") + assert hasattr(webexpythonsdk, "ApiError") + assert hasattr(webexpythonsdk, "AccessTokenError") + assert hasattr(webexpythonsdk, "RateLimitError") + assert hasattr(webexpythonsdk, "RateLimitWarning") + assert hasattr(webexpythonsdk, "webexpythonsdkException") # Data Models - assert hasattr(webexteamssdk, "dict_data_factory") - assert hasattr(webexteamssdk, "AccessToken") - assert hasattr(webexteamssdk, "AttachmentAction") - assert hasattr(webexteamssdk, "Event") - assert hasattr(webexteamssdk, "License") - assert hasattr(webexteamssdk, "Membership") - assert hasattr(webexteamssdk, "Message") - assert hasattr(webexteamssdk, "Organization") - assert hasattr(webexteamssdk, "Person") - assert hasattr(webexteamssdk, "Role") - assert hasattr(webexteamssdk, "Room") - assert hasattr(webexteamssdk, "Team") - assert hasattr(webexteamssdk, "TeamMembership") - assert hasattr(webexteamssdk, "Webhook") - assert hasattr(webexteamssdk, "WebhookEvent") - assert hasattr(webexteamssdk, "Recording") - assert hasattr(webexteamssdk, "immutable_data_factory") - assert hasattr(webexteamssdk, "SimpleDataModel") - assert hasattr(webexteamssdk, "simple_data_factory") + assert hasattr(webexpythonsdk, "dict_data_factory") + assert hasattr(webexpythonsdk, "AccessToken") + assert hasattr(webexpythonsdk, "AttachmentAction") + assert hasattr(webexpythonsdk, "Event") + assert hasattr(webexpythonsdk, "License") + assert hasattr(webexpythonsdk, "Membership") + assert hasattr(webexpythonsdk, "Message") + assert hasattr(webexpythonsdk, "Organization") + assert hasattr(webexpythonsdk, "Person") + assert hasattr(webexpythonsdk, "Role") + assert hasattr(webexpythonsdk, "Room") + assert hasattr(webexpythonsdk, "Team") + assert hasattr(webexpythonsdk, "TeamMembership") + assert hasattr(webexpythonsdk, "Webhook") + assert hasattr(webexpythonsdk, "WebhookEvent") + assert hasattr(webexpythonsdk, "Recording") + assert hasattr(webexpythonsdk, "immutable_data_factory") + assert hasattr(webexpythonsdk, "SimpleDataModel") + assert hasattr(webexpythonsdk, "simple_data_factory") diff --git a/tests/utils.py b/tests/utils.py index 1f83578..0005949 100644 --- a/tests/utils.py +++ b/tests/utils.py @@ -28,15 +28,15 @@ import requests from tests.environment import ( - WEBEX_TEAMS_TEST_STRING_PREFIX, - WEBEX_TEAMS_TEST_STRING_TEMPLATE, + WEBEX_TEST_STRING_PREFIX, + WEBEX_TEST_STRING_TEMPLATE, ) def create_string(item): """Create strings for tests.""" - return WEBEX_TEAMS_TEST_STRING_TEMPLATE.substitute( - prefix=WEBEX_TEAMS_TEST_STRING_PREFIX, + return WEBEX_TEST_STRING_TEMPLATE.substitute( + prefix=WEBEX_TEST_STRING_PREFIX, item=item, datetime=str(datetime.datetime.now()), ) From 9aef6b43142891118c5ecf29a658b17657227c9b Mon Sep 17 00:00:00 2001 From: Chris Lunsford Date: Thu, 20 Jun 2024 19:23:31 -0400 Subject: [PATCH 06/22] refactor: Remove future and Python v2 compatibility mechanisms --- docs/conf.py | 1 - examples/bot-example-flask.py | 8 - examples/bot-example-webpy.py | 8 - examples/local_file_upload.py | 1 - examples/ngrokwebhook.py | 8 - examples/people.py | 7 - .../pyramidWebexTeamsBot/views.py | 8 - examples/simple.py | 1 - generator/models/meeting_invitees.yaml | 24 +-- generator/models/meeting_registrants.yaml | 44 ++--- generator/models/meeting_templates.yaml | 18 +- generator/models/meetings.yaml | 80 ++++---- generator/templates/api.py | 21 +-- generator/templates/mixins.py | 8 - script/ipython_console.py | 8 - src/webexpythonsdk/__init__.py | 7 - src/webexpythonsdk/_metadata.py | 1 - src/webexpythonsdk/api/__init__.py | 49 +++-- src/webexpythonsdk/api/access_tokens.py | 43 ++--- src/webexpythonsdk/api/admin_audit_events.py | 25 +-- src/webexpythonsdk/api/attachment_actions.py | 21 +-- src/webexpythonsdk/api/events.py | 33 ++-- src/webexpythonsdk/api/guest_issuer.py | 29 +-- src/webexpythonsdk/api/licenses.py | 17 +- src/webexpythonsdk/api/meeting_invitees.py | 65 +++---- src/webexpythonsdk/api/meeting_registrants.py | 93 +++++---- src/webexpythonsdk/api/meeting_templates.py | 21 +-- src/webexpythonsdk/api/meetings.py | 177 +++++++++--------- src/webexpythonsdk/api/memberships.py | 45 ++--- src/webexpythonsdk/api/messages.py | 91 ++++----- src/webexpythonsdk/api/organizations.py | 13 +- src/webexpythonsdk/api/people.py | 99 +++++----- src/webexpythonsdk/api/recordings.py | 69 +++---- src/webexpythonsdk/api/roles.py | 13 +- src/webexpythonsdk/api/room_tabs.py | 49 ++--- src/webexpythonsdk/api/rooms.py | 69 +++---- src/webexpythonsdk/api/team_memberships.py | 37 ++-- src/webexpythonsdk/api/teams.py | 29 +-- src/webexpythonsdk/api/webhooks.py | 53 +++--- src/webexpythonsdk/config.py | 1 - src/webexpythonsdk/environment.py | 1 - src/webexpythonsdk/exceptions.py | 8 - src/webexpythonsdk/generator_containers.py | 8 - src/webexpythonsdk/models/cards/__init__.py | 1 - src/webexpythonsdk/models/cards/actions.py | 1 - .../models/cards/adaptive_card_component.py | 1 - src/webexpythonsdk/models/cards/card.py | 1 - src/webexpythonsdk/models/cards/components.py | 1 - src/webexpythonsdk/models/cards/container.py | 1 - src/webexpythonsdk/models/cards/inputs.py | 1 - src/webexpythonsdk/models/cards/options.py | 1 - src/webexpythonsdk/models/cards/utils.py | 1 - src/webexpythonsdk/models/dictionary.py | 11 +- src/webexpythonsdk/models/immutable.py | 20 +- .../models/mixins/access_token.py | 8 - .../models/mixins/admin_audit_event.py | 8 - .../models/mixins/attachment_action.py | 8 - src/webexpythonsdk/models/mixins/event.py | 8 - .../models/mixins/guest_issuer_token.py | 8 - src/webexpythonsdk/models/mixins/license.py | 8 - .../models/mixins/meeting_invitees.py | 8 - .../models/mixins/meeting_registrants.py | 8 - .../models/mixins/meeting_templates.py | 8 - src/webexpythonsdk/models/mixins/meetings.py | 8 - .../models/mixins/membership.py | 8 - src/webexpythonsdk/models/mixins/message.py | 8 - .../models/mixins/organization.py | 8 - src/webexpythonsdk/models/mixins/person.py | 8 - src/webexpythonsdk/models/mixins/recording.py | 8 - src/webexpythonsdk/models/mixins/role.py | 8 - src/webexpythonsdk/models/mixins/room.py | 8 - .../models/mixins/room_meeting_info.py | 8 - src/webexpythonsdk/models/mixins/room_tab.py | 8 - src/webexpythonsdk/models/mixins/team.py | 8 - .../models/mixins/team_membership.py | 8 - src/webexpythonsdk/models/mixins/webhook.py | 8 - .../models/mixins/webhook_event.py | 8 - src/webexpythonsdk/models/simple.py | 14 +- src/webexpythonsdk/response_codes.py | 7 - src/webexpythonsdk/restsession.py | 55 +++--- src/webexpythonsdk/utils.py | 23 +-- tests/__init__.py | 1 - tests/api/__init__.py | 1 - tests/api/test_admin_audit_events.py | 1 - tests/api/test_attachment_actions.py | 1 - tests/api/test_events.py | 1 - tests/api/test_guest_issuer.py | 1 - tests/api/test_licenses.py | 1 - tests/api/test_meeting_registrants.py | 1 - tests/api/test_meetings.py | 1 - tests/api/test_memberships.py | 1 - tests/api/test_messages.py | 1 - tests/api/test_organizations.py | 1 - tests/api/test_people.py | 1 - tests/api/test_recordings.py | 1 - tests/api/test_roles.py | 1 - tests/api/test_room_tabs.py | 1 - tests/api/test_rooms.py | 1 - tests/api/test_teammemberships.py | 1 - tests/api/test_teams.py | 1 - tests/conftest.py | 1 - tests/environment.py | 1 - tests/test_restsession.py | 1 - tests/test_webexteamssdk.py | 1 - tests/utils.py | 1 - 105 files changed, 599 insertions(+), 1159 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index 58fa8d8..c938fb4 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- import os import sys diff --git a/examples/bot-example-flask.py b/examples/bot-example-flask.py index 0398c4a..3b617c5 100755 --- a/examples/bot-example-flask.py +++ b/examples/bot-example-flask.py @@ -43,14 +43,6 @@ SOFTWARE. """ -# Use future for Python v2 and v3 compatibility -from __future__ import ( - absolute_import, - division, - print_function, - unicode_literals, -) -from builtins import * __author__ = "Chris Lunsford" diff --git a/examples/bot-example-webpy.py b/examples/bot-example-webpy.py index 29b1590..e4a9cb4 100755 --- a/examples/bot-example-webpy.py +++ b/examples/bot-example-webpy.py @@ -43,14 +43,6 @@ SOFTWARE. """ -# Use future for Python v2 and v3 compatibility -from __future__ import ( - absolute_import, - division, - print_function, - unicode_literals, -) -from builtins import * __author__ = "Brad Bester" diff --git a/examples/local_file_upload.py b/examples/local_file_upload.py index 3aaaaa6..2e5a773 100755 --- a/examples/local_file_upload.py +++ b/examples/local_file_upload.py @@ -38,7 +38,6 @@ SOFTWARE. """ -from __future__ import print_function import os diff --git a/examples/ngrokwebhook.py b/examples/ngrokwebhook.py index e724d20..e411b98 100755 --- a/examples/ngrokwebhook.py +++ b/examples/ngrokwebhook.py @@ -34,14 +34,6 @@ SOFTWARE. """ -# Use future for Python v2 and v3 compatibility -from __future__ import ( - absolute_import, - division, - print_function, - unicode_literals, -) -from builtins import * __author__ = "Brad Bester" diff --git a/examples/people.py b/examples/people.py index b8626d3..b88a88b 100755 --- a/examples/people.py +++ b/examples/people.py @@ -27,13 +27,6 @@ SOFTWARE. """ -from __future__ import ( - absolute_import, - division, - print_function, - unicode_literals, -) -from builtins import * __author__ = "Jose Bogarín Solano" diff --git a/examples/pyramidWebexTeamsBot/pyramidWebexTeamsBot/views.py b/examples/pyramidWebexTeamsBot/pyramidWebexTeamsBot/views.py index ff929e4..9d8db5a 100755 --- a/examples/pyramidWebexTeamsBot/pyramidWebexTeamsBot/views.py +++ b/examples/pyramidWebexTeamsBot/pyramidWebexTeamsBot/views.py @@ -43,14 +43,6 @@ SOFTWARE. """ -# Use future for Python v2 and v3 compatibility -from __future__ import ( - absolute_import, - division, - print_function, - unicode_literals, -) -from builtins import * __author__ = "Jose Bogarín Solano" diff --git a/examples/simple.py b/examples/simple.py index 33c7a1a..e6eab62 100755 --- a/examples/simple.py +++ b/examples/simple.py @@ -32,7 +32,6 @@ SOFTWARE. """ -from __future__ import print_function from webexpythonsdk import WebexAPI diff --git a/generator/models/meeting_invitees.yaml b/generator/models/meeting_invitees.yaml index c90348f..5412a8e 100644 --- a/generator/models/meeting_invitees.yaml +++ b/generator/models/meeting_invitees.yaml @@ -11,7 +11,7 @@ query_parameters: - name: meetingId description: Unique id of the meeting for which invitees are requested. optional: False - type: basestring + type: str - name: max description: Limit the number of meeting invitees optional: True @@ -19,7 +19,7 @@ query_parameters: - name: hostEmail description: Email address for the meeting host (requires admin scope) optional: True - type: basestring + type: str - name: panelist description: Filter invitees or attendees based on their panelist status optional: True @@ -33,7 +33,7 @@ create: - coHost - name: hostEmail description: Email address for the meeting host (requires admin scope) - type: basestring + type: str - name: sendEmail description: If true, send an e-mail to the invitee type: bool @@ -46,7 +46,7 @@ update: - coHost - name: hostEmail description: Email address for the meeting host (requires admin scope) - type: basestring + type: str - name: sendEmail description: If true, send an e-mail to the invitee type: bool @@ -55,19 +55,19 @@ list: properties: - name: id description: Unique id for the meeting invitee - type: basestring + type: str - name: email description: Email address for the meeting invitee - type: basestring + type: str - name: displayName description: Display name of the meeting invitee - type: basestring + type: str - name: coHost description: CoHost status of the invitee type: bool - name: meetingId description: Unique id for the meeting that the invitee is part of - type: basestring + type: str - name: panelist description: Flag to indicate if the invitee is panelist or not type: bool @@ -76,8 +76,8 @@ additional_code: > """ Bulk insert meeting invitees Args: - meetingId(basestring): Id of the meeting the invitees should be added to. - hostEmail(basestring): Email of the meeting host. + meetingId(str): Id of the meeting the invitees should be added to. + hostEmail(str): Email of the meeting host. items(list): List of invitees. Each invitee is a dict with email as the required key and displayName, coHost, sendEmail and panelist as optional properties. @@ -92,8 +92,8 @@ additional_code: > TypeError: If the parameter types are incorrect. ApiError: If the Webex cloud returns an error. """ - check_type(meetingId, basestring) - check_type(hostEmail, basestring, optional=True) + check_type(meetingId, str) + check_type(hostEmail, str, optional=True) check_type(items, list, optional=True) post_data = dict_from_items_with_values( diff --git a/generator/models/meeting_registrants.yaml b/generator/models/meeting_registrants.yaml index ba69d4e..63adbcd 100644 --- a/generator/models/meeting_registrants.yaml +++ b/generator/models/meeting_registrants.yaml @@ -9,7 +9,7 @@ methods: url_parameters: - name: meetingId description: Unique identifier for the meeting. - type: basestring + type: str query_parameters: - name: max description: Limit the maximum number of registrants in the response, up to 100. @@ -18,7 +18,7 @@ query_parameters: - name: hostEmail description: Email address for the meeting host. optional: True - type: basestring + type: str - name: current description: Whether or not to retrieve only the current scheduled meeting of the meeting series, i.e. the meeting ready to join or start or the upcoming meeting of the meeting series. optional: True @@ -26,74 +26,74 @@ query_parameters: - name: email description: Registrant's email to filter registrants. optional: True - type: basestring + type: str - name: registrationTimeFrom description: The time registrants register a meeting starts from the specified date and time (inclusive) in any ISO 8601 compliant format. optional: True - type: basestring + type: str - name: registrationTimeTo description: The time registrants register a meeting before the specified date and time (exclusive) in any ISO 8601 compliant format. optional: True - type: basestring + type: str list: properties: - name: registrantId description: New registrant's ID. - type: basestring + type: str - name: status description: New registrant's status. - type: basestring + type: str - name: firstName description: Registrant's first name. - type: basestring + type: str - name: lastName description: Registrant's last name. - type: basestring + type: str - name: email description: Registrant's email. - type: basestring + type: str - name: jobTitle description: Registrant's job title. - type: basestring + type: str - name: companyName description: Registrant's company. - type: basestring + type: str - name: address1 description: Registrant's first address line. - type: basestring + type: str - name: address2 description: Registrant's second address line. - type: basestring + type: str - name: city description: Registrant's city name. - type: basestring + type: str - name: state description: Registrant's state. - type: basestring + type: str - name: zipCode description: Registrant's postal code. type: int - name: countryRegion description: Registrant's country or region. - type: basestring + type: str - name: workPhone description: Registrant's work phone number. - type: basestring + type: str - name: fax description: Registrant's FAX number. - type: basestring + type: str - name: registrationTime description: Registrant's registration time. - type: basestring + type: str - name: customizedQuestions description: List of registrant's answers for customized questions, type: list - name: sourceId description: Registrant's source id. - type: basestring + type: str - name: registrationId description: Registrant's registration ID. - type: basestring + type: str create: required: diff --git a/generator/models/meeting_templates.yaml b/generator/models/meeting_templates.yaml index 6be5654..0e4f18a 100644 --- a/generator/models/meeting_templates.yaml +++ b/generator/models/meeting_templates.yaml @@ -8,11 +8,11 @@ query_parameters: - name: templateType description: Meeting template types (meeting, webinar) optional: True - type: basestring + type: str - name: locale description: Locale for the meeting template (i.e. en_US) optional: True - type: basestring + type: str - name: isDefault description: Flag to indicate if default or non-default meeting templates are returned optional: True @@ -26,26 +26,26 @@ query_parameters: optional: True type: bool - name: siteUrl - description: URL of the Webex site from which we are listing. + description: URL of the Webex site from which we are listing. optional: True type: bool list: properties: - name: id description: Unique id for meeting template - type: basestring + type: str - name: name description: Name of the meeting template - type: basestring + type: str - name: locale description: Locale for the meeting template - type: basestring + type: str - name: siteUrl description: Site URL for the meeting template - type: basestring + type: str - name: templateType description: Type of the meeting template (meeting, webinar) - type: basestring + type: str - name: isDefault description: Whether or not the meeting template is a default template type: bool @@ -54,4 +54,4 @@ list: type: bool - name: meeting description: Meeting object which is used to create a meeting by the meeting template. Please note that the meeting object should be used to create a meeting immediately. - type: dict \ No newline at end of file + type: dict diff --git a/generator/models/meetings.yaml b/generator/models/meetings.yaml index fe0197d..c47c3be 100644 --- a/generator/models/meetings.yaml +++ b/generator/models/meetings.yaml @@ -11,31 +11,31 @@ query_parameters: - name: meetingNumber description: Meeting number for the meeting objects being requested optional: True - type: basestring + type: str - name: webLink description: URL encoded link to information page optional: True - type: basestring + type: str - name: roomId description: Associated teams space room ID. optional: True - type: basestring + type: str - name: meetingType description: Type of the meeting (meetingSeries, scheduledMeeting, meeting). optional: True - type: basestring + type: str - name: state descriptiopn: State of the meeting (active, scheduled, ready, lobby, inProgress, ended, missed, expired) optional: True - type: basestring + type: str - name: scheduledType description: Schedule type of this meeting (meeting, webinar, personalRoomMeeting) optional: True - type: basestring + type: str - name: participantEmail description: E-Mail of a meeting participant. optional: True - type: basestring + type: str - name: current description: Flag to retrieve the current scheduled meeting of a series. optional: True @@ -44,11 +44,11 @@ query_parameters: requestName: from description: Start date and time in ISO 8601 format optional: True - type: basestring + type: str - name: to description: To date and time in ISO 8601 format optional: True - type: basestring + type: str - name: max description: Limit the number of meetings in response. optional: True @@ -56,15 +56,15 @@ query_parameters: - name: hostEmail description: Email address for the meeting host (Needs admin-level scope). optional: True - type: basestring + type: str - name: siteUrl description: URL of the webex site. optional: True - type: basestring + type: str - name: integrationTag description: External tag set by integrations. optional: True - type: basestring + type: str update: required: - title @@ -110,7 +110,7 @@ create: optional: - name: templateId description: Unique identifier for meeting template - type: basestring + type: str - agenda - password - timezone @@ -154,70 +154,70 @@ list: properties: - name: id description: Unique identifier for the meeting - type: basestring + type: str - name: meetingNumber description: Meeting number (of series, scheduled meeting or instance) - type: basestring + type: str - name: title description: Title of the meeting - type: basestring + type: str - name: agenda description: Meeting agenda (Maximum 1300 characters) - type: basestring + type: str - name: password description: Password of the meeting - type: basestring + type: str - name: phoneAndVideoSystemPassword description: 8-digit numeric password to join via phone/device - type: basestring + type: str - name: meetingType description: "Type of this meeting (Values: meetingSeries, scheduledMeeting, meeting)" - type: basestring + type: str - name: state description: "State of the meeting (Values: active, scheduled, ready, lobby, inProgress, ended, missed, expired)" - type: basestring + type: str - name: timezone description: Time zone of start and end property in IANA time zone database format. - type: basestring + type: str - name: start description: Start time of the meeting in ISO 8601. - type: basestring + type: str - name: end description: End time of the meeting in ISO 8601. - type: basestring + type: str - name: recurrence description: Meeting recurrence according to RFC 2445 - type: basestring + type: str - name: hostUserId description: Unique id of the meeting host. - type: basestring + type: str - name: hostDisplayName description: Display name for the meeting host - type: basestring + type: str - name: hostEmail description: Email address of the meeting host - type: basestring + type: str - name: hostKey description: Key for joining the meeting as host - type: basestring + type: str - name: siteUrl description: Site URL for the meeting - type: basestring + type: str - name: webLink description: Link to a meeting information page that launches the client - type: basestring + type: str - name: registerLink description: Link to a page where attendees can register for the webinar. Only applies for webinars. - type: basestring + type: str - name: sipAddress description: SIP address for callback from a video system - type: basestring + type: str - name: dialInIpAddress description: IP address for callback from video system. - type: basestring + type: str - name: roomId description: Room ID of the associated webex space. Only in space meetings. - type: basestring + type: str - name: enabledAutoRecordMeeting description: Whether or not meeting is recorded automatically. type: bool @@ -244,22 +244,22 @@ list: type: int - name: unlockedMeetingJoinSecurity description: Join settings for uninvited people - type: basestring + type: str - name: sessionTypeId description: Unique identifier for a meeting session type. - type: basestring + type: str - name: scheduledType description: Type of meeting (regular, webinar, meeting in personal room) - type: basestring + type: str - name: enabledWebcastView description: Whether or not webcast view is enabled type: bool - name: panelistPassword description: Password for panelists of a webinar meeting - type: basestring + type: str - name: phoneAndVideoSystemPanelistPassword description: 8-digit numeric panelist pasword for phone/device usage - type: basestring + type: str - name: enableAutomaticLock description: Whether or not to automatically lock the meeting after start. type: bool diff --git a/generator/templates/api.py b/generator/templates/api.py index 9f7c809..63f3c18 100644 --- a/generator/templates/api.py +++ b/generator/templates/api.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- """Webex {{ name }}s API wrapper. Copyright (c) 2016-2024 Cisco and/or its affiliates. @@ -23,16 +22,8 @@ """ -from __future__ import ( - absolute_import, - division, - print_function, - unicode_literals, -) -from builtins import * -from past.builtins import basestring from ..generator_containers import generator_container from ..restsession import RestSession @@ -234,7 +225,7 @@ def get(self, {% for up in url_parameters %}{{up['name']}}, {% endfor %}{{ objec {% for up in url_parameters -%} {{up['name']}} ({{ up['type']}}): {{ up['description']}} {% endfor -%} - {{ object_type }}Id(basestring): The {{ object_type }} ID. + {{ object_type }}Id(str): The {{ object_type }} ID. Returns: {{ name }}: A {{ name }} object with the details of the requested @@ -245,7 +236,7 @@ def get(self, {% for up in url_parameters %}{{up['name']}}, {% endfor %}{{ objec ApiError: If the Webex cloud returns an error. """ - check_type({{ object_type }}Id, basestring) + check_type({{ object_type }}Id, str) # Add URL parameters to the API endpoint request_url = API_ENDPOINT.format({{ ups|join(", ") }}) @@ -267,7 +258,7 @@ def delete(self, {% for up in url_parameters %}{{up['name']}}, {% endfor %}{{ ob {% for up in url_parameters -%} {{up['name']}} ({{ up['type']}}): {{ up['description']}} {% endfor -%} - {{ object_type }}Id(basestring): The {{ object_type }} ID. + {{ object_type }}Id(str): The {{ object_type }} ID. Raises: TypeError: If the parameter types are incorrect. @@ -277,7 +268,7 @@ def delete(self, {% for up in url_parameters %}{{up['name']}}, {% endfor %}{{ ob {% for up in url_parameters -%} check_type({{ up['name'] }}, {{ up['type'] }}) {% endfor -%} - check_type({{ object_type }}Id, basestring) + check_type({{ object_type }}Id, str) {%- if url_parameters %} {%- set ups = [] -%} {% for up in url_parameters|map(attribute='name') -%} @@ -306,7 +297,7 @@ def update(self, {{ object_type }}Id, {% for up in url_parameters -%} {{up['name']}} ({{ up['type']}}): {{ up['description']}} {% endfor -%} - {{ object_type }}Id(basestring): The {{ object_type }} ID. + {{ object_type }}Id(str): The {{ object_type }} ID. {% for up in update_parameters -%} {{ up['name'] }} ({{ up['type']}}): {{ up['description']}} {% endfor -%} @@ -322,7 +313,7 @@ def update(self, {{ object_type }}Id, ApiError: If the Webex cloud returns an error. """ - check_type({{ object_type }}Id, basestring) + check_type({{ object_type }}Id, str) {% for up in update_parameters -%} check_type({{ up['name'] }}, {{ up['type'] }}{% if up['optional'] %}, optional=True{% endif %}) {% endfor %} diff --git a/generator/templates/mixins.py b/generator/templates/mixins.py index 54d9bf9..60b0f7c 100644 --- a/generator/templates/mixins.py +++ b/generator/templates/mixins.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- """Webex {{ name }}s data model. Copyright (c) 2016-2024 Cisco and/or its affiliates. @@ -22,14 +21,7 @@ SOFTWARE. """ -from __future__ import ( - absolute_import, - division, - print_function, - unicode_literals, -) -from builtins import * diff --git a/script/ipython_console.py b/script/ipython_console.py index 743e88d..7939407 100755 --- a/script/ipython_console.py +++ b/script/ipython_console.py @@ -1,17 +1,9 @@ -# -*- coding: utf-8 -*- """IPython Project Console. Used to interactively work with the main package contents in IPython. """ -from __future__ import ( - absolute_import, - division, - print_function, - unicode_literals, -) -from builtins import * import webexpythonsdk diff --git a/src/webexpythonsdk/__init__.py b/src/webexpythonsdk/__init__.py index ae95ead..03eb040 100644 --- a/src/webexpythonsdk/__init__.py +++ b/src/webexpythonsdk/__init__.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- """Community-developed Python SDK for the Webex APIs. Copyright (c) 2016-2024 Cisco and/or its affiliates. @@ -22,12 +21,6 @@ SOFTWARE. """ -from __future__ import ( - absolute_import, - division, - print_function, - unicode_literals, -) import logging diff --git a/src/webexpythonsdk/_metadata.py b/src/webexpythonsdk/_metadata.py index 7fbe40d..ce75609 100644 --- a/src/webexpythonsdk/_metadata.py +++ b/src/webexpythonsdk/_metadata.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- """Package metadata. Copyright (c) 2016-2024 Cisco and/or its affiliates. diff --git a/src/webexpythonsdk/api/__init__.py b/src/webexpythonsdk/api/__init__.py index f5c8ed7..6842ffa 100644 --- a/src/webexpythonsdk/api/__init__.py +++ b/src/webexpythonsdk/api/__init__.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- """Webex API wrappers. Copyright (c) 2016-2024 Cisco and/or its affiliates. @@ -22,7 +21,7 @@ SOFTWARE. """ -from past.types import basestring +from past.types import str from webexpythonsdk.config import ( DEFAULT_BASE_URL, @@ -105,10 +104,10 @@ def __init__( via one of these two methods. Args: - access_token(basestring): The access token to be used for API + access_token(str): The access token to be used for API calls to the Webex service. Defaults to checking for a WEBEX_ACCESS_TOKEN environment variable. - base_url(basestring): The base URL to be prefixed to the + base_url(str): The base URL to be prefixed to the individual API endpoint suffixes. Defaults to webexpythonsdk.DEFAULT_BASE_URL. single_request_timeout(int): Timeout (in seconds) for RESTful HTTP @@ -119,20 +118,20 @@ def __init__( webexpythonsdk.config.DEFAULT_WAIT_ON_RATE_LIMIT. object_factory(callable): The factory function to use to create Python objects from the returned Webex JSON data objects. - client_id(basestring): The client id of your integration. Provided + client_id(str): The client id of your integration. Provided upon creation in the portal. - client_secret(basestring): The client secret of your integration. + client_secret(str): The client secret of your integration. Provided upon creation in the portal. - oauth_code(basestring): The oauth authorization code provided by + oauth_code(str): The oauth authorization code provided by the user oauth process. - oauth_redirect_uri(basestring): The redirect URI used in the user + oauth_redirect_uri(str): The redirect URI used in the user OAuth process. proxies(dict): Dictionary of proxies passed on to the requests session. - be_geo_id(basestring): Optional partner identifier for API usage + be_geo_id(str): Optional partner identifier for API usage tracking. Defaults to checking for a BE_GEO_ID environment variable. - caller(basestring): Optional identifier for API usage tracking. + caller(str): Optional identifier for API usage tracking. Defaults to checking for a WEBEX_PYTHON_SDK_CALLER environment variable. disable_ssl_verify(bool): Optional boolean flag to disable ssl @@ -148,17 +147,17 @@ def __init__( access_token argument or an environment variable. """ - check_type(access_token, basestring, optional=True) - check_type(base_url, basestring, optional=True) + check_type(access_token, str, optional=True) + check_type(base_url, str, optional=True) check_type(single_request_timeout, int, optional=True) check_type(wait_on_rate_limit, bool, optional=True) - check_type(client_id, basestring, optional=True) - check_type(client_secret, basestring, optional=True) - check_type(oauth_code, basestring, optional=True) - check_type(redirect_uri, basestring, optional=True) + check_type(client_id, str, optional=True) + check_type(client_secret, str, optional=True) + check_type(oauth_code, str, optional=True) + check_type(redirect_uri, str, optional=True) check_type(proxies, dict, optional=True) - check_type(be_geo_id, basestring, optional=True) - check_type(caller, basestring, optional=True) + check_type(be_geo_id, str, optional=True) + check_type(caller, str, optional=True) check_type(disable_ssl_verify, bool, optional=True) access_token = access_token or WEBEX_ACCESS_TOKEN @@ -281,12 +280,12 @@ def from_oauth_code(cls, client_id, client_secret, code, redirect_uri): token to create a new WebexAPI connection object. Args: - client_id(basestring): Provided when you created your integration. - client_secret(basestring): Provided when you created your + client_id(str): Provided when you created your integration. + client_secret(str): Provided when you created your integration. - code(basestring): The Authorization Code provided by the user + code(str): The Authorization Code provided by the user OAuth process. - redirect_uri(basestring): The redirect URI used in the user OAuth + redirect_uri(str): The redirect URI used in the user OAuth process. Returns: @@ -311,10 +310,10 @@ def from_oauth_refresh(cls, client_id, client_secret, refresh_token): token to create a new WebexAPI connection object. Args: - client_id(basestring): Provided when you created your integration. - client_secret(basestring): Provided when you created your + client_id(str): Provided when you created your integration. + client_secret(str): Provided when you created your integration. - refresh_token(basestring): Provided when you requested the Access + refresh_token(str): Provided when you requested the Access Token. Returns: diff --git a/src/webexpythonsdk/api/access_tokens.py b/src/webexpythonsdk/api/access_tokens.py index c0f0fcf..2d740f8 100644 --- a/src/webexpythonsdk/api/access_tokens.py +++ b/src/webexpythonsdk/api/access_tokens.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- """Webex Access-Tokens API wrapper. Copyright (c) 2016-2024 Cisco and/or its affiliates. @@ -22,21 +21,11 @@ SOFTWARE. """ -from __future__ import ( - absolute_import, - division, - print_function, - unicode_literals, -) -from future import standard_library -standard_library.install_aliases() -from builtins import * import urllib.parse -from past.builtins import basestring import requests from ..response_codes import EXPECTED_RESPONSE_CODE @@ -65,7 +54,7 @@ def __init__(self, base_url, object_factory, single_request_timeout=None): """Initialize an AccessTokensAPI object with the provided RestSession. Args: - base_url(basestring): The base URL the API endpoints. + base_url(str): The base URL the API endpoints. single_request_timeout(int): Timeout in seconds for the API requests. @@ -73,7 +62,7 @@ def __init__(self, base_url, object_factory, single_request_timeout=None): TypeError: If the parameter types are incorrect. """ - check_type(base_url, basestring) + check_type(base_url, str) check_type(single_request_timeout, int, optional=True) super(AccessTokensAPI, self).__init__() @@ -102,12 +91,12 @@ def get(self, client_id, client_secret, code, redirect_uri): invoke the APIs. Args: - client_id(basestring): Provided when you created your integration. - client_secret(basestring): Provided when you created your + client_id(str): Provided when you created your integration. + client_secret(str): Provided when you created your integration. - code(basestring): The Authorization Code provided by the user + code(str): The Authorization Code provided by the user OAuth process. - redirect_uri(basestring): The redirect URI used in the user OAuth + redirect_uri(str): The redirect URI used in the user OAuth process. Returns: @@ -119,10 +108,10 @@ def get(self, client_id, client_secret, code, redirect_uri): ApiError: If the Webex cloud returns an error. """ - check_type(client_id, basestring) - check_type(client_secret, basestring) - check_type(code, basestring) - check_type(redirect_uri, basestring) + check_type(client_id, str) + check_type(client_secret, str) + check_type(code, str) + check_type(redirect_uri, str) post_data = dict_from_items_with_values( grant_type="authorization_code", @@ -146,10 +135,10 @@ def refresh(self, client_id, client_secret, refresh_token): """Return a refreshed Access Token from the provided refresh_token. Args: - client_id(basestring): Provided when you created your integration. - client_secret(basestring): Provided when you created your + client_id(str): Provided when you created your integration. + client_secret(str): Provided when you created your integration. - refresh_token(basestring): Provided when you requested the Access + refresh_token(str): Provided when you requested the Access Token. Returns: @@ -161,9 +150,9 @@ def refresh(self, client_id, client_secret, refresh_token): ApiError: If the Webex cloud returns an error. """ - check_type(client_id, basestring) - check_type(client_secret, basestring) - check_type(refresh_token, basestring) + check_type(client_id, str) + check_type(client_secret, str) + check_type(refresh_token, str) post_data = dict_from_items_with_values( grant_type="refresh_token", diff --git a/src/webexpythonsdk/api/admin_audit_events.py b/src/webexpythonsdk/api/admin_audit_events.py index 641277e..2302725 100644 --- a/src/webexpythonsdk/api/admin_audit_events.py +++ b/src/webexpythonsdk/api/admin_audit_events.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- """Webex Admin Audit Events API wrapper. Copyright (c) 2016-2024 Cisco and/or its affiliates. @@ -22,16 +21,8 @@ SOFTWARE. """ -from __future__ import ( - absolute_import, - division, - print_function, - unicode_literals, -) -from builtins import * -from past.builtins import basestring from webexpythonsdk.generator_containers import generator_container from webexpythonsdk.restsession import RestSession @@ -92,12 +83,12 @@ def list( container. Args: - orgId(basestring): List events in this organization, by ID. - _from(basestring): List events which occurred after a specific + orgId(str): List events in this organization, by ID. + _from(str): List events which occurred after a specific date and time. - to(basestring): List events which occurred before a specific date + to(str): List events which occurred before a specific date and time. - actorId(basestring): List events performed by this person, by ID. + actorId(str): List events performed by this person, by ID. max(int): Limit the maximum number of events in the response. The maximum value is 200. offset(int): Offset from the first result that you want to fetch. @@ -112,10 +103,10 @@ def list( TypeError: If the parameter types are incorrect. ApiError: If the Webex cloud returns an error. """ - check_type(orgId, basestring) - check_type(_from, basestring) - check_type(to, basestring) - check_type(actorId, basestring, optional=True) + check_type(orgId, str) + check_type(_from, str) + check_type(to, str) + check_type(actorId, str, optional=True) check_type(max, int) check_type(offset, int) diff --git a/src/webexpythonsdk/api/attachment_actions.py b/src/webexpythonsdk/api/attachment_actions.py index 0e92fb9..b9d7307 100644 --- a/src/webexpythonsdk/api/attachment_actions.py +++ b/src/webexpythonsdk/api/attachment_actions.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- """Webex Attachment Actions API wrapper. Copyright (c) 2016-2024 Cisco and/or its affiliates. @@ -22,16 +21,8 @@ SOFTWARE. """ -from __future__ import ( - absolute_import, - division, - print_function, - unicode_literals, -) -from builtins import * -from past.builtins import basestring from ..models.immutable import AttachmentAction from ..restsession import RestSession @@ -70,8 +61,8 @@ def create(self, type, messageId, inputs, **request_parameters): """Create a new attachment action. Args: - type(basestring): The type of action to perform. - messageId(basestring): The ID of the message which contains the + type(str): The type of action to perform. + messageId(str): The ID of the message which contains the attachment. inputs(dict): The attachment action's inputs. **request_parameters: Additional request parameters (provides @@ -89,8 +80,8 @@ def create(self, type, messageId, inputs, **request_parameters): contain a valid URL or path to a local file. """ - check_type(type, basestring) - check_type(messageId, basestring) + check_type(type, str) + check_type(messageId, str) check_type(inputs, dict) post_data = dict_from_items_with_values( @@ -106,7 +97,7 @@ def get(self, id): """Get the details for a attachment action, by ID. Args: - id(basestring): A unique identifier for the attachment action. + id(str): A unique identifier for the attachment action. Returns: AttachmentAction: A Attachment Action object with the details of @@ -117,7 +108,7 @@ def get(self, id): ApiError: If the Webex cloud returns an error. """ - check_type(id, basestring) + check_type(id, str) # API request json_data = self._session.get(API_ENDPOINT + "/" + id) diff --git a/src/webexpythonsdk/api/events.py b/src/webexpythonsdk/api/events.py index e9ffd22..13762f6 100644 --- a/src/webexpythonsdk/api/events.py +++ b/src/webexpythonsdk/api/events.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- """Webex Events API wrapper. Copyright (c) 2016-2024 Cisco and/or its affiliates. @@ -22,16 +21,8 @@ SOFTWARE. """ -from __future__ import ( - absolute_import, - division, - print_function, - unicode_literals, -) -from builtins import * -from past.builtins import basestring from ..generator_containers import generator_container from ..restsession import RestSession @@ -101,15 +92,15 @@ def list( container. Args: - resource(basestring): Limit results to a specific resource type. + resource(str): Limit results to a specific resource type. Possible values: "messages", "memberships". - type(basestring): Limit results to a specific event type. Possible + type(str): Limit results to a specific event type. Possible values: "created", "updated", "deleted". - actorId(basestring): Limit results to events performed by this + actorId(str): Limit results to events performed by this person, by ID. - _from(basestring): Limit results to events which occurred after a + _from(str): Limit results to events which occurred after a date and time, in ISO8601 format (yyyy-MM-dd'T'HH:mm:ss.SSSZ). - to(basestring): Limit results to events which occurred before a + to(str): Limit results to events which occurred before a date and time, in ISO8601 format (yyyy-MM-dd'T'HH:mm:ss.SSSZ). max(int): Limit the maximum number of items returned from the Webex service per request. @@ -125,11 +116,11 @@ def list( ApiError: If the Webex cloud returns an error. """ - check_type(resource, basestring, optional=True) - check_type(type, basestring, optional=True) - check_type(actorId, basestring, optional=True) - check_type(_from, basestring, optional=True) - check_type(to, basestring, optional=True) + check_type(resource, str, optional=True) + check_type(type, str, optional=True) + check_type(actorId, str, optional=True) + check_type(_from, str, optional=True) + check_type(to, str, optional=True) check_type(max, int, optional=True) params = dict_from_items_with_values( @@ -156,7 +147,7 @@ def get(self, eventId): """Get the details for an event, by event ID. Args: - eventId(basestring): The ID of the event to be retrieved. + eventId(str): The ID of the event to be retrieved. Returns: Event: A event object with the details of the requested room. @@ -166,7 +157,7 @@ def get(self, eventId): ApiError: If the Webex cloud returns an error. """ - check_type(eventId, basestring) + check_type(eventId, str) # API request json_data = self._session.get(API_ENDPOINT + "/" + eventId) diff --git a/src/webexpythonsdk/api/guest_issuer.py b/src/webexpythonsdk/api/guest_issuer.py index 985c4cb..de9c67e 100644 --- a/src/webexpythonsdk/api/guest_issuer.py +++ b/src/webexpythonsdk/api/guest_issuer.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- """Webex Guest Issuer API wrapper. Copyright (c) 2016-2024 Cisco and/or its affiliates. @@ -22,16 +21,8 @@ SOFTWARE. """ -from __future__ import ( - absolute_import, - division, - print_function, - unicode_literals, -) -from builtins import * -from past.builtins import basestring from ..generator_containers import generator_container from ..restsession import RestSession @@ -82,18 +73,18 @@ def create(self, sub, name, iss, exp, secret): This function returns a guest issuer with an api access token. Args: - sub(basestring): The subject of the token. This is your unique + sub(str): The subject of the token. This is your unique and public identifier for the guest user. This claim may contain only letters, numbers, and hyphens. - name(basestring): The display name of the guest user. This will be + name(str): The display name of the guest user. This will be the name shown in Webex clients. - iss(basestring): The issuer of the token. Use the Guest + iss(str): The issuer of the token. Use the Guest Issuer ID provided in My Webex Apps. - exp(basestring): The exp time of the token, as a UNIX + exp(str): The exp time of the token, as a UNIX timestamp in seconds. Use the lowest practical value for the use of the token. This is not the exp time for the guest user's session. - secret(basestring): Use the secret Webex provided you when you + secret(str): Use the secret Webex provided you when you created your Guest Issuer App. The secret will be used to sign the token request. @@ -104,11 +95,11 @@ def create(self, sub, name, iss, exp, secret): TypeError: If the parameter types are incorrect ApiError: If the webex teams cloud returns an error. """ - check_type(sub, basestring) - check_type(name, basestring) - check_type(iss, basestring) - check_type(exp, basestring) - check_type(secret, basestring) + check_type(sub, str) + check_type(name, str) + check_type(iss, str) + check_type(exp, str) + check_type(secret, str) payload = {"sub": sub, "name": name, "iss": iss, "exp": exp} diff --git a/src/webexpythonsdk/api/licenses.py b/src/webexpythonsdk/api/licenses.py index 8273e1a..240a1c3 100644 --- a/src/webexpythonsdk/api/licenses.py +++ b/src/webexpythonsdk/api/licenses.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- """Webex Licenses API wrapper. Copyright (c) 2016-2024 Cisco and/or its affiliates. @@ -22,16 +21,8 @@ SOFTWARE. """ -from __future__ import ( - absolute_import, - division, - print_function, - unicode_literals, -) -from builtins import * -from past.builtins import basestring from ..generator_containers import generator_container from ..restsession import RestSession @@ -79,7 +70,7 @@ def list(self, orgId=None, **request_parameters): authenticated user. Args: - orgId(basestring): Specify the organization, by ID. + orgId(str): Specify the organization, by ID. **request_parameters: Additional request parameters (provides support for parameters that may be added in the future). @@ -92,7 +83,7 @@ def list(self, orgId=None, **request_parameters): ApiError: If the Webex cloud returns an error. """ - check_type(orgId, basestring, optional=True) + check_type(orgId, str, optional=True) params = dict_from_items_with_values( request_parameters, @@ -110,7 +101,7 @@ def get(self, licenseId): """Get the details of a License, by ID. Args: - licenseId(basestring): The ID of the License to be retrieved. + licenseId(str): The ID of the License to be retrieved. Returns: License: A License object with the details of the requested @@ -121,7 +112,7 @@ def get(self, licenseId): ApiError: If the Webex cloud returns an error. """ - check_type(licenseId, basestring) + check_type(licenseId, str) # API request json_data = self._session.get(API_ENDPOINT + "/" + licenseId) diff --git a/src/webexpythonsdk/api/meeting_invitees.py b/src/webexpythonsdk/api/meeting_invitees.py index 0e368ae..15d4a0e 100644 --- a/src/webexpythonsdk/api/meeting_invitees.py +++ b/src/webexpythonsdk/api/meeting_invitees.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- """Webex MeetingInvitees API wrapper. Copyright (c) 2016-2024 Cisco and/or its affiliates. @@ -22,16 +21,8 @@ SOFTWARE. """ -from __future__ import ( - absolute_import, - division, - print_function, - unicode_literals, -) -from builtins import * -from past.builtins import basestring from ..generator_containers import generator_container from ..restsession import RestSession @@ -96,10 +87,10 @@ def list( container. Args: - meetingId (basestring): Unique id of the meeting for which invitees + meetingId (str): Unique id of the meeting for which invitees are requested. max (int): Limit the number of meeting invitees. - hostEmail (basestring): Email address for the meeting host + hostEmail (str): Email address for the meeting host (requires admin scope). panelist (bool): Filter invitees or attendees based on their panelist status. @@ -116,9 +107,9 @@ def list( ApiError: If the Webex cloud returns an error. """ - check_type(meetingId, basestring) + check_type(meetingId, str) check_type(max, int, optional=True) - check_type(hostEmail, basestring, optional=True) + check_type(hostEmail, str, optional=True) check_type(panelist, bool, optional=True) check_type(headers, dict, optional=True) @@ -161,12 +152,12 @@ def create( """Create a meetingInvitee. Args: - meetingId (basestring): Unique id for the meeting that the invitee + meetingId (str): Unique id for the meeting that the invitee is part of. - email (basestring): Email address for the meeting invitee. - displayName (basestring): Display name of the meeting invitee. + email (str): Email address for the meeting invitee. + displayName (str): Display name of the meeting invitee. coHost (bool): CoHost status of the invitee. - hostEmail (basestring): Email address for the meeting host + hostEmail (str): Email address for the meeting host (requires admin scope). sendEmail (bool): If true, send an e-mail to the invitee. panelist (bool): Flag to indicate if the invitee is panelist or @@ -183,11 +174,11 @@ def create( ApiError: If the Webex cloud returns an error. """ - check_type(meetingId, basestring) - check_type(email, basestring) - check_type(displayName, basestring, optional=True) + check_type(meetingId, str) + check_type(email, str) + check_type(displayName, str, optional=True) check_type(coHost, bool, optional=True) - check_type(hostEmail, basestring, optional=True) + check_type(hostEmail, str, optional=True) check_type(sendEmail, bool, optional=True) check_type(panelist, bool, optional=True) @@ -212,7 +203,7 @@ def get(self, meetingInviteeId): """Get details for a meetingInvitee, by ID. Args: - meetingInviteeId(basestring): The meetingInvitee ID. + meetingInviteeId(str): The meetingInvitee ID. Returns: MeetingInvitee: A MeetingInvitee object with the details of the @@ -223,7 +214,7 @@ def get(self, meetingInviteeId): ApiError: If the Webex cloud returns an error. """ - check_type(meetingInviteeId, basestring) + check_type(meetingInviteeId, str) # API request json_data = self._session.get(API_ENDPOINT + "/" + meetingInviteeId) @@ -235,14 +226,14 @@ def delete(self, meetingInviteeId): """Delete a meetingInvitee, by ID. Args: - meetingInviteeId(basestring): The meetingInvitee ID. + meetingInviteeId(str): The meetingInvitee ID. Raises: TypeError: If the parameter types are incorrect. ApiError: If the Webex cloud returns an error. """ - check_type(meetingInviteeId, basestring) + check_type(meetingInviteeId, str) # API request self._session.delete(API_ENDPOINT + "/" + meetingInviteeId) @@ -261,11 +252,11 @@ def update( """Update properties for a meetingInvitee, by ID. Args: - meetingInviteeId(basestring): The meetingInvitee ID. - email (basestring): Email address for the meeting invitee. - displayName (basestring): Display name of the meeting invitee. + meetingInviteeId(str): The meetingInvitee ID. + email (str): Email address for the meeting invitee. + displayName (str): Display name of the meeting invitee. coHost (bool): Cohost status of the invitee. - hostEmail (basestring): Email address for the meeting host + hostEmail (str): Email address for the meeting host (requires admin scope). sendEmail (bool): If true, send an e-mail to the invitee. panelist (bool): Flag to indicate if the invitee is panelist or @@ -282,11 +273,11 @@ def update( ApiError: If the Webex cloud returns an error. """ - check_type(meetingInviteeId, basestring) - check_type(email, basestring) - check_type(displayName, basestring, optional=True) + check_type(meetingInviteeId, str) + check_type(email, str) + check_type(displayName, str, optional=True) check_type(coHost, bool, optional=True) - check_type(hostEmail, basestring, optional=True) + check_type(hostEmail, str, optional=True) check_type(sendEmail, bool, optional=True) check_type(panelist, bool, optional=True) @@ -314,9 +305,9 @@ def bulk( """Bulk insert meeting invitees Args: - meetingId(basestring): Id of the meeting the invitees should be added + meetingId(str): Id of the meeting the invitees should be added to. - hostEmail(basestring): Email of the meeting host. + hostEmail(str): Email of the meeting host. items(list): List of invitees. Each invitee is a dict with email as the required key and displayName, coHost, sendEmail and panelist as optional properties. @@ -331,8 +322,8 @@ def bulk( TypeError: If the parameter types are incorrect. ApiError: If the Webex cloud returns an error. """ - check_type(meetingId, basestring) - check_type(hostEmail, basestring, optional=True) + check_type(meetingId, str) + check_type(hostEmail, str, optional=True) check_type(items, list, optional=True) post_data = dict_from_items_with_values( diff --git a/src/webexpythonsdk/api/meeting_registrants.py b/src/webexpythonsdk/api/meeting_registrants.py index 92a49ff..a70ccb7 100644 --- a/src/webexpythonsdk/api/meeting_registrants.py +++ b/src/webexpythonsdk/api/meeting_registrants.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- """Webex MeetingRegistrants API wrapper. Copyright (c) 2016-2024 Cisco and/or its affiliates. @@ -22,16 +21,8 @@ SOFTWARE. """ -from __future__ import ( - absolute_import, - division, - print_function, - unicode_literals, -) -from builtins import * -from past.builtins import basestring from ..generator_containers import generator_container from ..restsession import RestSession @@ -99,18 +90,18 @@ def list( container. Args: - meetingId (basestring): Unique identifier for the meeting. + meetingId (str): Unique identifier for the meeting. max (int): Limit the maximum number of registrants in the response, up to 100. - hostEmail (basestring): Email address for the meeting host. + hostEmail (str): Email address for the meeting host. current (bool): Whether or not to retrieve only the current scheduled meeting of the meeting series, i.e. the meeting ready to join or start or the upcoming meeting of the meeting series. - email (basestring): Registrant's email to filter registrants. - registrationTimeFrom (basestring): The time registrants register a + email (str): Registrant's email to filter registrants. + registrationTimeFrom (str): The time registrants register a meeting starts from the specified date and time (inclusive) in any ISO 8601 compliant format. - registrationTimeTo (basestring): The time registrants register a + registrationTimeTo (str): The time registrants register a meeting before the specified date and time (exclusive) in any ISO 8601 compliant format. headers(dict): Additional headers to be passed. @@ -126,13 +117,13 @@ def list( ApiError: If the Webex cloud returns an error. """ - check_type(meetingId, basestring) + check_type(meetingId, str) check_type(max, int, optional=True) - check_type(hostEmail, basestring, optional=True) + check_type(hostEmail, str, optional=True) check_type(current, bool, optional=True) - check_type(email, basestring, optional=True) - check_type(registrationTimeFrom, basestring, optional=True) - check_type(registrationTimeTo, basestring, optional=True) + check_type(email, str, optional=True) + check_type(registrationTimeFrom, str, optional=True) + check_type(registrationTimeTo, str, optional=True) check_type(headers, dict, optional=True) headers = headers or {} @@ -187,20 +178,20 @@ def create( """Create a meetingRegistrant. Args: - meetingId (basestring): Unique identifier for the meeting. - firstName (basestring): Registrant's first name. - lastName (basestring): Registrant's last name. - email (basestring): Registrant's email. + meetingId (str): Unique identifier for the meeting. + firstName (str): Registrant's first name. + lastName (str): Registrant's last name. + email (str): Registrant's email. sendEmail (bool): If true send email to the registrant. - jobTitle (basestring): Registrant's job title. - address1 (basestring): Registrant's first address line. - address2 (basestring): Registrant's second address line. - city (basestring): Registrant's city name. - state (basestring): Registrant's state. + jobTitle (str): Registrant's job title. + address1 (str): Registrant's first address line. + address2 (str): Registrant's second address line. + city (str): Registrant's city name. + state (str): Registrant's state. zipCode (int): Registrant's postal code. - countryRegion (basestring): Registrant's country or region. - workPhone (basestring): Registrant's work phone number. - fax (basestring): Registrant's FAX number. + countryRegion (str): Registrant's country or region. + workPhone (str): Registrant's work phone number. + fax (str): Registrant's FAX number. customizedQuestions (list): List of registrant's answers for customized questions, **request_parameters: Additional request parameters (provides @@ -215,20 +206,20 @@ def create( ApiError: If the Webex cloud returns an error. """ - check_type(meetingId, basestring) - check_type(firstName, basestring) - check_type(lastName, basestring) - check_type(email, basestring) + check_type(meetingId, str) + check_type(firstName, str) + check_type(lastName, str) + check_type(email, str) check_type(sendEmail, bool, optional=True) - check_type(jobTitle, basestring, optional=True) - check_type(address1, basestring, optional=True) - check_type(address2, basestring, optional=True) - check_type(city, basestring, optional=True) - check_type(state, basestring, optional=True) + check_type(jobTitle, str, optional=True) + check_type(address1, str, optional=True) + check_type(address2, str, optional=True) + check_type(city, str, optional=True) + check_type(state, str, optional=True) check_type(zipCode, int, optional=True) - check_type(countryRegion, basestring, optional=True) - check_type(workPhone, basestring, optional=True) - check_type(fax, basestring, optional=True) + check_type(countryRegion, str, optional=True) + check_type(workPhone, str, optional=True) + check_type(fax, str, optional=True) check_type(customizedQuestions, list, optional=True) post_data = dict_from_items_with_values( @@ -262,8 +253,8 @@ def get(self, meetingId, meetingRegistrantId): """Get details for a meetingRegistrant, by ID. Args: - meetingId (basestring): Unique identifier for the meeting. - meetingRegistrantId(basestring): The meetingRegistrant ID. + meetingId (str): Unique identifier for the meeting. + meetingRegistrantId(str): The meetingRegistrant ID. Returns: MeetingRegistrant: A MeetingRegistrant object with the details of @@ -274,8 +265,8 @@ def get(self, meetingId, meetingRegistrantId): ApiError: If the Webex cloud returns an error. """ - check_type(meetingId, basestring) - check_type(meetingRegistrantId, basestring) + check_type(meetingId, str) + check_type(meetingRegistrantId, str) # Add URL parameters to the API endpoint request_url = API_ENDPOINT.format(meetingId=meetingId) @@ -290,16 +281,16 @@ def delete(self, meetingId, meetingRegistrantId): """Delete a meetingRegistrant, by ID. Args: - meetingId (basestring): Unique identifier for the meeting. - meetingRegistrantId(basestring): The meetingRegistrant ID. + meetingId (str): Unique identifier for the meeting. + meetingRegistrantId(str): The meetingRegistrant ID. Raises: TypeError: If the parameter types are incorrect. ApiError: If the Webex cloud returns an error. """ - check_type(meetingId, basestring) - check_type(meetingRegistrantId, basestring) + check_type(meetingId, str) + check_type(meetingRegistrantId, str) # Add URL parameters to the API endpoint request_url = API_ENDPOINT.format(meetingId=meetingId) diff --git a/src/webexpythonsdk/api/meeting_templates.py b/src/webexpythonsdk/api/meeting_templates.py index 66c7b48..94e5f50 100644 --- a/src/webexpythonsdk/api/meeting_templates.py +++ b/src/webexpythonsdk/api/meeting_templates.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- """Webex MeetingTemplates API wrapper. Copyright (c) 2016-2024 Cisco and/or its affiliates. @@ -22,16 +21,8 @@ SOFTWARE. """ -from __future__ import ( - absolute_import, - division, - print_function, - unicode_literals, -) -from builtins import * -from past.builtins import basestring from ..generator_containers import generator_container from ..restsession import RestSession @@ -98,9 +89,9 @@ def list( container. Args: - templateType (basestring): Meeting template types (meeting, + templateType (str): Meeting template types (meeting, webinar). - locale (basestring): Locale for the meeting template (i.e. en_US). + locale (str): Locale for the meeting template (i.e. en_US). isDefault (bool): Flag to indicate if default or non-default meeting templates are returned. isStandard (bool): Flag to indicate if standard or non-standard @@ -121,8 +112,8 @@ def list( ApiError: If the Webex cloud returns an error. """ - check_type(templateType, basestring, optional=True) - check_type(locale, basestring, optional=True) + check_type(templateType, str, optional=True) + check_type(locale, str, optional=True) check_type(isDefault, bool, optional=True) check_type(isStandard, bool, optional=True) check_type(hostEmail, bool, optional=True) @@ -160,7 +151,7 @@ def get(self, meetingTemplateId): """Get details for a meetingTemplate, by ID. Args: - meetingTemplateId(basestring): The meetingTemplate ID. + meetingTemplateId(str): The meetingTemplate ID. Returns: MeetingTemplate: A MeetingTemplate object with the details of the @@ -171,7 +162,7 @@ def get(self, meetingTemplateId): ApiError: If the Webex cloud returns an error. """ - check_type(meetingTemplateId, basestring) + check_type(meetingTemplateId, str) # API request json_data = self._session.get(API_ENDPOINT + "/" + meetingTemplateId) diff --git a/src/webexpythonsdk/api/meetings.py b/src/webexpythonsdk/api/meetings.py index 578b524..fa6f0eb 100644 --- a/src/webexpythonsdk/api/meetings.py +++ b/src/webexpythonsdk/api/meetings.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- """Webex Meetings API wrapper. Copyright (c) 2016-2024 Cisco and/or its affiliates. @@ -22,16 +21,8 @@ SOFTWARE. """ -from __future__ import ( - absolute_import, - division, - print_function, - unicode_literals, -) -from builtins import * -from past.builtins import basestring from ..generator_containers import generator_container from ..restsession import RestSession @@ -106,25 +97,25 @@ def list( container. Args: - meetingNumber (basestring): Meeting number for the meeting objects + meetingNumber (str): Meeting number for the meeting objects being requested. - webLink (basestring): URL encoded link to information page. - roomId (basestring): Associated teams space room ID. - meetingType (basestring): Type of the meeting (meetingSeries, + webLink (str): URL encoded link to information page. + roomId (str): Associated teams space room ID. + meetingType (str): Type of the meeting (meetingSeries, scheduledMeeting, meeting). - state (basestring): - scheduledType (basestring): Schedule type of this meeting (meeting, + state (str): + scheduledType (str): Schedule type of this meeting (meeting, webinar, personalRoomMeeting). - participantEmail (basestring): E-Mail of a meeting participant. + participantEmail (str): E-Mail of a meeting participant. current (bool): Flag to retrieve the current scheduled meeting of a series. - from_ (basestring): Start date and time in ISO 8601 format. - to (basestring): To date and time in ISO 8601 format. + from_ (str): Start date and time in ISO 8601 format. + to (str): To date and time in ISO 8601 format. max (int): Limit the number of meetings in response. - hostEmail (basestring): Email address for the meeting host (Needs + hostEmail (str): Email address for the meeting host (Needs admin-level scope). - siteUrl (basestring): URL of the webex site. - integrationTag (basestring): External tag set by integrations. + siteUrl (str): URL of the webex site. + integrationTag (str): External tag set by integrations. headers(dict): Additional headers to be passed. **request_parameters: Additional request parameters (provides support for parameters that may be added in the future). @@ -138,20 +129,20 @@ def list( ApiError: If the Webex cloud returns an error. """ - check_type(meetingNumber, basestring, optional=True) - check_type(webLink, basestring, optional=True) - check_type(roomId, basestring, optional=True) - check_type(meetingType, basestring, optional=True) - check_type(state, basestring, optional=True) - check_type(scheduledType, basestring, optional=True) - check_type(participantEmail, basestring, optional=True) + check_type(meetingNumber, str, optional=True) + check_type(webLink, str, optional=True) + check_type(roomId, str, optional=True) + check_type(meetingType, str, optional=True) + check_type(state, str, optional=True) + check_type(scheduledType, str, optional=True) + check_type(participantEmail, str, optional=True) check_type(current, bool, optional=True) - check_type(from_, basestring, optional=True) - check_type(to, basestring, optional=True) + check_type(from_, str, optional=True) + check_type(to, str, optional=True) check_type(max, int, optional=True) - check_type(hostEmail, basestring, optional=True) - check_type(siteUrl, basestring, optional=True) - check_type(integrationTag, basestring, optional=True) + check_type(hostEmail, str, optional=True) + check_type(siteUrl, str, optional=True) + check_type(integrationTag, str, optional=True) check_type(headers, dict, optional=True) headers = headers if headers is not None else {} @@ -236,15 +227,15 @@ def create( """Create a meeting. Args: - title (basestring): Title of the meeting. - start (basestring): Start time of the meeting in ISO 8601. - end (basestring): End time of the meeting in ISO 8601. - templateId (basestring): Unique identifier for meeting template. - agenda (basestring): Meeting agenda (Maximum 1300 characters). - password (basestring): Password of the meeting. - timezone (basestring): Time zone of start and end property in + title (str): Title of the meeting. + start (str): Start time of the meeting in ISO 8601. + end (str): End time of the meeting in ISO 8601. + templateId (str): Unique identifier for meeting template. + agenda (str): Meeting agenda (Maximum 1300 characters). + password (str): Password of the meeting. + timezone (str): Time zone of start and end property in IANA time zone database format. - recurrence (basestring): Meeting recurrence according to RFC 2445. + recurrence (str): Meeting recurrence according to RFC 2445. enabledAutoRecordMeeting (bool): Whether or not meeting is recorded automatically. allowAnyUserToBeCoHost (bool): Allow any attendee with host @@ -261,14 +252,14 @@ def create( calendar. reminderTime (int): Number of minutes before start time a reminder is send to the host. - unlockedMeetingJoinSecurity (basestring): Join settings for + unlockedMeetingJoinSecurity (str): Join settings for uninvited people. - sessionTypeId (basestring): Unique identifier for a meeting + sessionTypeId (str): Unique identifier for a meeting session type. - scheduledType (basestring): Type of meeting (regular, webinar, + scheduledType (str): Type of meeting (regular, webinar, meeting in personal room). enabledWebcastView (bool): Whether or not webcast view is enabled. - panelistPassword (basestring): Password for panelists of a + panelistPassword (str): Password for panelists of a webinar meeting. enableAutomaticLock (bool): Whether or not to automatically lock the meeting after start. @@ -281,8 +272,8 @@ def create( start or join the meeting. invitees (list): List of invitee objects. sendEmail (bool): Send an invite e-mail. - hostEmail (basestring): Email address of the meeting host. - siteUrl (basestring): Site URL for the meeting. + hostEmail (str): Email address of the meeting host. + siteUrl (str): Site URL for the meeting. meetingOptions (dict): Options for this meeting. registration (dict): Meeting registration information. integrationTags (list): List of external keys created by @@ -303,14 +294,14 @@ def create( ApiError: If the Webex cloud returns an error. """ - check_type(title, basestring) - check_type(start, basestring) - check_type(end, basestring) - check_type(templateId, basestring, optional=True) - check_type(agenda, basestring, optional=True) - check_type(password, basestring, optional=True) - check_type(timezone, basestring, optional=True) - check_type(recurrence, basestring, optional=True) + check_type(title, str) + check_type(start, str) + check_type(end, str) + check_type(templateId, str, optional=True) + check_type(agenda, str, optional=True) + check_type(password, str, optional=True) + check_type(timezone, str, optional=True) + check_type(recurrence, str, optional=True) check_type(enabledAutoRecordMeeting, bool, optional=True) check_type(allowAnyUserToBeCoHost, bool, optional=True) check_type(enabledJoinBeforeHost, bool, optional=True) @@ -319,19 +310,19 @@ def create( check_type(excludePassword, bool, optional=True) check_type(publicMeeting, bool, optional=True) check_type(reminderTime, int, optional=True) - check_type(unlockedMeetingJoinSecurity, basestring, optional=True) - check_type(sessionTypeId, basestring, optional=True) - check_type(scheduledType, basestring, optional=True) + check_type(unlockedMeetingJoinSecurity, str, optional=True) + check_type(sessionTypeId, str, optional=True) + check_type(scheduledType, str, optional=True) check_type(enabledWebcastView, bool, optional=True) - check_type(panelistPassword, basestring, optional=True) + check_type(panelistPassword, str, optional=True) check_type(enableAutomaticLock, bool, optional=True) check_type(automaticLockMinutes, int, optional=True) check_type(allowFirstUserToBeCoHost, bool, optional=True) check_type(allowAuthenticatedDevices, bool, optional=True) check_type(invitees, list, optional=True) check_type(sendEmail, bool, optional=True) - check_type(hostEmail, basestring, optional=True) - check_type(siteUrl, basestring, optional=True) + check_type(hostEmail, str, optional=True) + check_type(siteUrl, str, optional=True) check_type(meetingOptions, dict, optional=True) check_type(registration, dict, optional=True) check_type(integrationTags, list, optional=True) @@ -390,7 +381,7 @@ def get(self, meetingId): """Get details for a meeting, by ID. Args: - meetingId(basestring): The meeting ID. + meetingId(str): The meeting ID. Returns: Meeting: A Meeting object with the details of the requested @@ -401,7 +392,7 @@ def get(self, meetingId): ApiError: If the Webex cloud returns an error. """ - check_type(meetingId, basestring) + check_type(meetingId, str) request_url = API_ENDPOINT # API request @@ -414,14 +405,14 @@ def delete(self, meetingId): """Delete a meeting, by ID. Args: - meetingId(basestring): The meeting ID. + meetingId(str): The meeting ID. Raises: TypeError: If the parameter types are incorrect. ApiError: If the Webex cloud returns an error. """ - check_type(meetingId, basestring) + check_type(meetingId, str) request_url = API_ENDPOINT # API request @@ -465,15 +456,15 @@ def update( """Update properties for a meeting, by ID. Args: - meetingId(basestring): The meeting ID. - title (basestring): Title of the meeting. - password (basestring): Password of the meeting. - start (basestring): Start time of the meeting in ISO 8601. - end (basestring): End time of the meeting in ISO 8601. - agenda (basestring): Meeting agenda (Maximum 1300 characters). - timezone (basestring): Time zone of start and end property in IANA + meetingId(str): The meeting ID. + title (str): Title of the meeting. + password (str): Password of the meeting. + start (str): Start time of the meeting in ISO 8601. + end (str): End time of the meeting in ISO 8601. + agenda (str): Meeting agenda (Maximum 1300 characters). + timezone (str): Time zone of start and end property in IANA time zone database format. - recurrence (basestring): Meeting recurrence according to RFC 2445. + recurrence (str): Meeting recurrence according to RFC 2445. enabledAutoRecordMeeting (bool): Whether or not meeting is recorded automatically. allowAnyUserToBeCoHost (bool): Allow any attendee with host account @@ -490,14 +481,14 @@ def update( calendar. reminderTime (int): Number of minutes before start time a reminder is send to the host. - unlockedMeetingJoinSecurity (basestring): Join settings for + unlockedMeetingJoinSecurity (str): Join settings for uninvited people. - sessionTypeId (basestring): Unique identifier for a meeting session + sessionTypeId (str): Unique identifier for a meeting session type. - scheduledType (basestring): Type of meeting (regular, webinar, + scheduledType (str): Type of meeting (regular, webinar, meeting in personal room). enabledWebcastView (bool): Whether or not webcast view is enabled. - panelistPassword (basestring): Password for panelists of a webinar + panelistPassword (str): Password for panelists of a webinar meeting. enableAutomaticLock (bool): Whether or not to automatically lock the meeting after start. @@ -509,8 +500,8 @@ def update( authenticated video devices in the meeting's organization to start or join the meeting. sendEmail (bool): Send an invite e-mail. - hostEmail (basestring): Email address of the meeting host. - siteUrl (basestring): Site URL for the meeting. + hostEmail (str): Email address of the meeting host. + siteUrl (str): Site URL for the meeting. meetingOptions (dict): Options for this meeting. integrationTags (list): List of external keys created by integrations. @@ -528,14 +519,14 @@ def update( ApiError: If the Webex cloud returns an error. """ - check_type(meetingId, basestring) - check_type(title, basestring) - check_type(password, basestring) - check_type(start, basestring) - check_type(end, basestring) - check_type(agenda, basestring, optional=True) - check_type(timezone, basestring, optional=True) - check_type(recurrence, basestring, optional=True) + check_type(meetingId, str) + check_type(title, str) + check_type(password, str) + check_type(start, str) + check_type(end, str) + check_type(agenda, str, optional=True) + check_type(timezone, str, optional=True) + check_type(recurrence, str, optional=True) check_type(enabledAutoRecordMeeting, bool, optional=True) check_type(allowAnyUserToBeCoHost, bool, optional=True) check_type(enabledJoinBeforeHost, bool, optional=True) @@ -544,18 +535,18 @@ def update( check_type(excludePassword, bool, optional=True) check_type(publicMeeting, bool, optional=True) check_type(reminderTime, int, optional=True) - check_type(unlockedMeetingJoinSecurity, basestring, optional=True) - check_type(sessionTypeId, basestring, optional=True) - check_type(scheduledType, basestring, optional=True) + check_type(unlockedMeetingJoinSecurity, str, optional=True) + check_type(sessionTypeId, str, optional=True) + check_type(scheduledType, str, optional=True) check_type(enabledWebcastView, bool, optional=True) - check_type(panelistPassword, basestring, optional=True) + check_type(panelistPassword, str, optional=True) check_type(enableAutomaticLock, bool, optional=True) check_type(automaticLockMinutes, int, optional=True) check_type(allowFirstUserToBeCoHost, bool, optional=True) check_type(allowAuthenticatedDevices, bool, optional=True) check_type(sendEmail, bool, optional=True) - check_type(hostEmail, basestring, optional=True) - check_type(siteUrl, basestring, optional=True) + check_type(hostEmail, str, optional=True) + check_type(siteUrl, str, optional=True) check_type(meetingOptions, dict, optional=True) check_type(integrationTags, list, optional=True) check_type(enabledBreakoutSessions, bool, optional=True) diff --git a/src/webexpythonsdk/api/memberships.py b/src/webexpythonsdk/api/memberships.py index 1058731..17c0a50 100644 --- a/src/webexpythonsdk/api/memberships.py +++ b/src/webexpythonsdk/api/memberships.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- """Webex Memberships API wrapper. Copyright (c) 2016-2024 Cisco and/or its affiliates. @@ -22,16 +21,8 @@ SOFTWARE. """ -from __future__ import ( - absolute_import, - division, - print_function, - unicode_literals, -) -from builtins import * -from past.builtins import basestring from ..generator_containers import generator_container from ..restsession import RestSession @@ -102,9 +93,9 @@ def list( container. Args: - roomId(basestring): Limit results to a specific room, by ID. - personId(basestring): Limit results to a specific person, by ID. - personEmail(basestring): Limit results to a specific person, by + roomId(str): Limit results to a specific room, by ID. + personId(str): Limit results to a specific person, by ID. + personEmail(str): Limit results to a specific person, by email address. max(int): Limit the maximum number of items returned from the Webex service per request. @@ -120,9 +111,9 @@ def list( ApiError: If the Webex cloud returns an error. """ - check_type(roomId, basestring, optional=True) - check_type(personId, basestring, optional=True) - check_type(personEmail, basestring, optional=True) + check_type(roomId, str, optional=True) + check_type(personId, str, optional=True) + check_type(personEmail, str, optional=True) check_type(max, int, optional=True) params = dict_from_items_with_values( @@ -154,9 +145,9 @@ def create( making them a moderator. Args: - roomId(basestring): The room ID. - personId(basestring): The ID of the person. - personEmail(basestring): The email address of the person. + roomId(str): The room ID. + personId(str): The ID of the person. + personEmail(str): The email address of the person. isModerator(bool): Set to True to make the person a room moderator. **request_parameters: Additional request parameters (provides support for parameters that may be added in the future). @@ -170,9 +161,9 @@ def create( ApiError: If the Webex cloud returns an error. """ - check_type(roomId, basestring) - check_type(personId, basestring, optional=True) - check_type(personEmail, basestring, optional=True) + check_type(roomId, str) + check_type(personId, str, optional=True) + check_type(personEmail, str, optional=True) check_type(isModerator, bool, optional=True) post_data = dict_from_items_with_values( @@ -193,7 +184,7 @@ def get(self, membershipId): """Get details for a membership, by ID. Args: - membershipId(basestring): The membership ID. + membershipId(str): The membership ID. Returns: Membership: A Membership object with the details of the requested @@ -204,7 +195,7 @@ def get(self, membershipId): ApiError: If the Webex cloud returns an error. """ - check_type(membershipId, basestring) + check_type(membershipId, str) # API request json_data = self._session.get(API_ENDPOINT + "/" + membershipId) @@ -216,7 +207,7 @@ def update(self, membershipId, isModerator=None, **request_parameters): """Update properties for a membership, by ID. Args: - membershipId(basestring): The membership ID. + membershipId(str): The membership ID. isModerator(bool): Set to True to make the person a room moderator. **request_parameters: Additional request parameters (provides support for parameters that may be added in the future). @@ -230,7 +221,7 @@ def update(self, membershipId, isModerator=None, **request_parameters): ApiError: If the Webex cloud returns an error. """ - check_type(membershipId, basestring) + check_type(membershipId, str) check_type(isModerator, bool, optional=True) put_data = dict_from_items_with_values( @@ -250,14 +241,14 @@ def delete(self, membershipId): """Delete a membership, by ID. Args: - membershipId(basestring): The membership ID. + membershipId(str): The membership ID. Raises: TypeError: If the parameter types are incorrect. ApiError: If the Webex cloud returns an error. """ - check_type(membershipId, basestring) + check_type(membershipId, str) # API request self._session.delete(API_ENDPOINT + "/" + membershipId) diff --git a/src/webexpythonsdk/api/messages.py b/src/webexpythonsdk/api/messages.py index ce8870f..4f1448c 100644 --- a/src/webexpythonsdk/api/messages.py +++ b/src/webexpythonsdk/api/messages.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- """Webex Messages API wrapper. Copyright (c) 2016-2024 Cisco and/or its affiliates. @@ -22,16 +21,8 @@ SOFTWARE. """ -from __future__ import ( - absolute_import, - division, - print_function, - unicode_literals, -) -from builtins import * -from past.builtins import basestring from requests_toolbelt import MultipartEncoder from webexpythonsdk.models.cards import AdaptiveCard @@ -103,13 +94,13 @@ def list( container. Args: - roomId(basestring): List messages for a room, by ID. - parentId(basestring): List messages with a parent, by ID. - mentionedPeople(basestring): List messages where the caller is + roomId(str): List messages for a room, by ID. + parentId(str): List messages with a parent, by ID. + mentionedPeople(str): List messages where the caller is mentioned by specifying "me" or the caller `personId`. - before(basestring): List messages sent before a date and time, in + before(str): List messages sent before a date and time, in ISO8601 format. - beforeMessage(basestring): List messages sent before a message, + beforeMessage(str): List messages sent before a message, by ID. max(int): Limit the maximum number of items returned from the Webex service per request. @@ -125,11 +116,11 @@ def list( ApiError: If the Webex cloud returns an error. """ - check_type(roomId, basestring) - check_type(parentId, basestring, optional=True) - check_type(mentionedPeople, basestring, optional=True) - check_type(before, basestring, optional=True) - check_type(beforeMessage, basestring, optional=True) + check_type(roomId, str) + check_type(parentId, str, optional=True) + check_type(mentionedPeople, str, optional=True) + check_type(before, str, optional=True) + check_type(beforeMessage, str, optional=True) check_type(max, int, optional=True) params = dict_from_items_with_values( @@ -175,10 +166,10 @@ def list_direct( container. Args: - personId(basestring): List messages in a 1:1 room, by person ID. - personEmail(basestring): List messages in a 1:1 room, by person + personId(str): List messages in a 1:1 room, by person ID. + personEmail(str): List messages in a 1:1 room, by person email. - parentId(basestring): List messages with a parent, by ID. + parentId(str): List messages with a parent, by ID. **request_parameters: Additional request parameters (provides support for parameters that may be added in the future). @@ -191,9 +182,9 @@ def list_direct( ApiError: If the Webex cloud returns an error. """ - check_type(personId, basestring, optional=True) - check_type(personEmail, basestring, optional=True) - check_type(parentId, basestring, optional=True) + check_type(personId, str, optional=True) + check_type(personEmail, str, optional=True) + check_type(parentId, str, optional=True) params = dict_from_items_with_values( request_parameters, @@ -231,20 +222,20 @@ def create( the message. Args: - roomId(basestring): The room ID. - toPersonId(basestring): The ID of the recipient when sending a + roomId(str): The room ID. + toPersonId(str): The ID of the recipient when sending a private 1:1 message. - toPersonEmail(basestring): The email address of the recipient when + toPersonEmail(str): The email address of the recipient when sending a private 1:1 message. - text(basestring): The message, in plain text. If `markdown` is + text(str): The message, in plain text. If `markdown` is specified this parameter may be optionally used to provide alternate text for UI clients that do not support rich text. - markdown(basestring): The message, in markdown format. + markdown(str): The message, in markdown format. files(list): A list of public URL(s) or local path(s) to files to be posted into the room. Only one file is allowed per message. attachments(list): Content attachments to attach to the message. See the Cards Guide for more information. - parentId(basestring): The parent message to reply to. This will + parentId(str): The parent message to reply to. This will start or reply to a thread. **request_parameters: Additional request parameters (provides support for parameters that may be added in the future). @@ -260,14 +251,14 @@ def create( contain a valid URL or path to a local file. """ - check_type(roomId, basestring, optional=True) - check_type(toPersonId, basestring, optional=True) - check_type(toPersonEmail, basestring, optional=True) - check_type(text, basestring, optional=True) - check_type(markdown, basestring, optional=True) + check_type(roomId, str, optional=True) + check_type(toPersonId, str, optional=True) + check_type(toPersonEmail, str, optional=True) + check_type(text, str, optional=True) + check_type(markdown, str, optional=True) check_type(files, list, optional=True) check_type(attachments, list, optional=True) - check_type(parentId, basestring, optional=True) + check_type(parentId, str, optional=True) if files: if len(files) > 1: @@ -279,7 +270,7 @@ def create( "only one file may be included with the " "message." ) - check_type(files[0], basestring) + check_type(files[0], str) else: files = None @@ -333,7 +324,7 @@ def get(self, messageId): """Get the details of a message, by ID. Args: - messageId(basestring): The ID of the message to be retrieved. + messageId(str): The ID of the message to be retrieved. Returns: Message: A Message object with the details of the requested @@ -344,7 +335,7 @@ def get(self, messageId): ApiError: If the Webex cloud returns an error. """ - check_type(messageId, basestring) + check_type(messageId, str) # API request json_data = self._session.get(API_ENDPOINT + "/" + messageId) @@ -356,14 +347,14 @@ def delete(self, messageId): """Delete a message. Args: - messageId(basestring): The ID of the message to be deleted. + messageId(str): The ID of the message to be deleted. Raises: TypeError: If the parameter types are incorrect. ApiError: If the Webex cloud returns an error. """ - check_type(messageId, basestring) + check_type(messageId, str) # API request self._session.delete(API_ENDPOINT + "/" + messageId) @@ -372,22 +363,22 @@ def edit(self, messageId=None, roomId=None, text=None, markdown=None): """Edit a message. Args: - messageId(basestring): The ID of the message to be edit. - roomId(basestring): The room ID. - text(basestring): The message, in plain text. If `markdown` is + messageId(str): The ID of the message to be edit. + roomId(str): The room ID. + text(str): The message, in plain text. If `markdown` is specified this parameter may be optionally used to provide alternate text for UI clients that do not support rich text. - markdown(basestring): The message, in markdown format. + markdown(str): The message, in markdown format. Raises: TypeError: If the parameter types are incorrect. ApiError: If the Webex cloud returns an error. """ - check_type(messageId, basestring) - check_type(roomId, basestring, optional=True) - check_type(text, basestring, optional=True) - check_type(markdown, basestring, optional=True) + check_type(messageId, str) + check_type(roomId, str, optional=True) + check_type(text, str, optional=True) + check_type(markdown, str, optional=True) put_data = dict_from_items_with_values( roomId=roomId, diff --git a/src/webexpythonsdk/api/organizations.py b/src/webexpythonsdk/api/organizations.py index fc023d6..7e8bd44 100644 --- a/src/webexpythonsdk/api/organizations.py +++ b/src/webexpythonsdk/api/organizations.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- """Webex Organizations API wrapper. Copyright (c) 2016-2024 Cisco and/or its affiliates. @@ -22,16 +21,8 @@ SOFTWARE. """ -from __future__ import ( - absolute_import, - division, - print_function, - unicode_literals, -) -from builtins import * -from past.builtins import basestring from webexpythonsdk.generator_containers import generator_container from webexpythonsdk.restsession import RestSession @@ -98,7 +89,7 @@ def get(self, orgId): """Get the details of an Organization, by ID. Args: - orgId(basestring): The ID of the Organization to be retrieved. + orgId(str): The ID of the Organization to be retrieved. Returns: Organization: An Organization object with the details of the @@ -109,7 +100,7 @@ def get(self, orgId): ApiError: If the Webex cloud returns an error. """ - check_type(orgId, basestring) + check_type(orgId, str) # API request json_data = self._session.get(API_ENDPOINT + "/" + orgId) diff --git a/src/webexpythonsdk/api/people.py b/src/webexpythonsdk/api/people.py index 8c74e48..d510518 100644 --- a/src/webexpythonsdk/api/people.py +++ b/src/webexpythonsdk/api/people.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- """Webex People API wrapper. Copyright (c) 2016-2024 Cisco and/or its affiliates. @@ -22,16 +21,8 @@ SOFTWARE. """ -from __future__ import ( - absolute_import, - division, - print_function, - unicode_literals, -) -from builtins import * -from past.builtins import basestring from ..generator_containers import generator_container from ..restsession import RestSession @@ -104,12 +95,12 @@ def list( container. Args: - email(basestring): The e-mail address of the person to be found. - displayName(basestring): The complete or beginning portion of + email(str): The e-mail address of the person to be found. + displayName(str): The complete or beginning portion of the displayName to be searched. - id(basestring): List people by ID. Accepts up to 85 person IDs + id(str): List people by ID. Accepts up to 85 person IDs separated by commas. - orgId(basestring): The organization ID. + orgId(str): The organization ID. max(int): Limit the maximum number of items returned from the Webex service per request. **request_parameters: Additional request parameters (provides @@ -124,10 +115,10 @@ def list( ApiError: If the Webex cloud returns an error. """ - check_type(id, basestring, optional=True) - check_type(email, basestring, optional=True) - check_type(displayName, basestring, optional=True) - check_type(orgId, basestring, optional=True) + check_type(id, str, optional=True) + check_type(email, str, optional=True) + check_type(displayName, str, optional=True) + check_type(orgId, str, optional=True) check_type(max, int, optional=True) params = dict_from_items_with_values( @@ -176,24 +167,24 @@ def create( Args: emails(`list`): Email address(es) of the person (list of strings). phoneNumbers(`list`): Phone numbers for the person. - extension(basestring): Webex Calling extension of the person. - locationId(basestring): The ID of the location for this person. - displayName(basestring): Full name of the person. - firstName(basestring): First name of the person. - lastName(basestring): Last name of the person. - avatar(basestring): URL to the person's avatar in PNG format. - orgId(basestring): ID of the organization to which this + extension(str): Webex Calling extension of the person. + locationId(str): The ID of the location for this person. + displayName(str): Full name of the person. + firstName(str): First name of the person. + lastName(str): Last name of the person. + avatar(str): URL to the person's avatar in PNG format. + orgId(str): ID of the organization to which this person belongs. roles(`list`): Roles of the person (list of strings containing the role IDs to be assigned to the person). licenses(`list`): Licenses allocated to the person (list of strings - containing the license IDs to be allocated to the person). - department(basestring): The business department the user belongs + department(str): The business department the user belongs to. - manager(basestring): A manager identifier. - managerId(basestring): Person ID of the manager. - title(basestring): The person's title. + manager(str): A manager identifier. + managerId(str): Person ID of the manager. + title(str): The person's title. addresses(`list`): A person's addresses. siteUrls(`list`): One or several site names where this user has an attendee role. @@ -215,19 +206,19 @@ def create( """ check_type(emails, list) check_type(phoneNumbers, list, optional=True) - check_type(extension, basestring, optional=True) - check_type(locationId, basestring, optional=True) - check_type(displayName, basestring, optional=True) - check_type(firstName, basestring, optional=True) - check_type(lastName, basestring, optional=True) - check_type(avatar, basestring, optional=True) - check_type(orgId, basestring, optional=True) + check_type(extension, str, optional=True) + check_type(locationId, str, optional=True) + check_type(displayName, str, optional=True) + check_type(firstName, str, optional=True) + check_type(lastName, str, optional=True) + check_type(avatar, str, optional=True) + check_type(orgId, str, optional=True) check_type(roles, list, optional=True) check_type(licenses, list, optional=True) - check_type(department, basestring, optional=True) - check_type(manager, basestring, optional=True) - check_type(managerId, basestring, optional=True) - check_type(title, basestring, optional=True) + check_type(department, str, optional=True) + check_type(manager, str, optional=True) + check_type(managerId, str, optional=True) + check_type(title, str, optional=True) check_type(addresses, list, optional=True) check_type(siteUrls, list, optional=True) check_type(callingData, bool, optional=True) @@ -271,7 +262,7 @@ def get(self, personId): """Get a person's details, by ID. Args: - personId(basestring): The ID of the person to be retrieved. + personId(str): The ID of the person to be retrieved. Returns: Person: A Person object with the details of the requested person. @@ -281,7 +272,7 @@ def get(self, personId): ApiError: If the Webex cloud returns an error. """ - check_type(personId, basestring) + check_type(personId, str) # API request json_data = self._session.get(API_ENDPOINT + "/" + personId) @@ -314,13 +305,13 @@ def update( unchanged values. Args: - personId(basestring): The person ID. + personId(str): The person ID. emails(`list`): Email address(es) of the person (list of strings). - displayName(basestring): Full name of the person. - firstName(basestring): First name of the person. - lastName(basestring): Last name of the person. - avatar(basestring): URL to the person's avatar in PNG format. - orgId(basestring): ID of the organization to which this + displayName(str): Full name of the person. + firstName(str): First name of the person. + lastName(str): Last name of the person. + avatar(str): URL to the person's avatar in PNG format. + orgId(str): ID of the organization to which this person belongs. roles(`list`): Roles of the person (list of strings containing the role IDs to be assigned to the person). @@ -339,11 +330,11 @@ def update( """ check_type(emails, list, optional=True) - check_type(displayName, basestring, optional=True) - check_type(firstName, basestring, optional=True) - check_type(lastName, basestring, optional=True) - check_type(avatar, basestring, optional=True) - check_type(orgId, basestring, optional=True) + check_type(displayName, str, optional=True) + check_type(firstName, str, optional=True) + check_type(lastName, str, optional=True) + check_type(avatar, str, optional=True) + check_type(orgId, str, optional=True) check_type(roles, list, optional=True) check_type(licenses, list, optional=True) @@ -373,14 +364,14 @@ def delete(self, personId): Only an admin can remove a person. Args: - personId(basestring): The ID of the person to be deleted. + personId(str): The ID of the person to be deleted. Raises: TypeError: If the parameter types are incorrect. ApiError: If the Webex cloud returns an error. """ - check_type(personId, basestring) + check_type(personId, str) # API request self._session.delete(API_ENDPOINT + "/" + personId) diff --git a/src/webexpythonsdk/api/recordings.py b/src/webexpythonsdk/api/recordings.py index 9d0952b..4df83ad 100644 --- a/src/webexpythonsdk/api/recordings.py +++ b/src/webexpythonsdk/api/recordings.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- """Webex Recordings API wrapper. Copyright (c) 2016-2024 Cisco and/or its affiliates. @@ -22,15 +21,7 @@ SOFTWARE. """ -from __future__ import ( - absolute_import, - division, - print_function, - unicode_literals, -) -from builtins import * -from past.builtins import basestring from webexpythonsdk.generator_containers import generator_container @@ -103,20 +94,20 @@ def list( Args: max(int): Limit the maximum number of items returned from the Webex service per request. - _from(basestring): List recordings which occurred after a specific + _from(str): List recordings which occurred after a specific date and time. - to(basestring): List recordings which occurred before a specific + to(str): List recordings which occurred before a specific date and time. - meetingId(basestring): List recordings filtered by ID. - hostEmail(basestring): Email address of meeting host. - siteUrl(basestring): URL of the Webex site which the API lists + meetingId(str): List recordings filtered by ID. + hostEmail(str): Email address of meeting host. + siteUrl(str): URL of the Webex site which the API lists recordings from. - integrationTag(basestring): External key of the parent meeting + integrationTag(str): External key of the parent meeting created by an integration application. - topic(basestring): Recording's topic (case-insensitive). - format(basestring): Recording's format; if specified, it should be + topic(str): Recording's topic (case-insensitive). + format(str): Recording's format; if specified, it should be either "MP4" or "ARF". - serviceType(basestring): Recording's service type; if specified, it + serviceType(str): Recording's service type; if specified, it should be either of: MeetingCenter, EventCenter, @@ -134,15 +125,15 @@ def list( ApiError: If the Webex cloud returns an error. """ check_type(max, int, optional=True) - check_type(_from, basestring, optional=True) - check_type(to, basestring, optional=True) - check_type(meetingId, basestring, optional=True) - check_type(hostEmail, basestring, optional=True) - check_type(siteUrl, basestring, optional=True) - check_type(integrationTag, basestring) - check_type(topic, basestring, optional=True) - check_type(format, basestring, optional=True) - check_type(serviceType, basestring, optional=True) + check_type(_from, str, optional=True) + check_type(to, str, optional=True) + check_type(meetingId, str, optional=True) + check_type(hostEmail, str, optional=True) + check_type(siteUrl, str, optional=True) + check_type(integrationTag, str) + check_type(topic, str, optional=True) + check_type(format, str, optional=True) + check_type(serviceType, str, optional=True) params = dict_from_items_with_values( request_parameters, @@ -167,10 +158,10 @@ def get(self, recordingId, siteUrl=None, hostEmail=None): """Get the details of a recording, by ID. Args: - recordingId(basestring): The ID of the recording to be retrieved. - siteUrl(basestring): URL of the Webex site which the API gets + recordingId(str): The ID of the recording to be retrieved. + siteUrl(str): URL of the Webex site which the API gets recordings from. - hostEmail(basestring): Email address of meeting host. + hostEmail(str): Email address of meeting host. Returns: Recording: A Recording object with the details of the requested @@ -181,9 +172,9 @@ def get(self, recordingId, siteUrl=None, hostEmail=None): ApiError: If the Webex cloud returns an error. """ - check_type(recordingId, basestring) - check_type(siteUrl, basestring, optional=True) - check_type(hostEmail, basestring, optional=True) + check_type(recordingId, str) + check_type(siteUrl, str, optional=True) + check_type(hostEmail, str, optional=True) params = dict_from_items_with_values( siteUrl=siteUrl, hostEmail=hostEmail @@ -199,19 +190,19 @@ def delete(self, recordingId, siteUrl=None, hostEmail=None): """Delete a recording. Args: - recordingId(basestring): The ID of the recording to be deleted. - siteUrl(basestring): URL of the Webex site which the API deletes + recordingId(str): The ID of the recording to be deleted. + siteUrl(str): URL of the Webex site which the API deletes recording from. - hostEmail(basestring): Email address of meeting host. + hostEmail(str): Email address of meeting host. Raises: TypeError: If the parameter types are incorrect. ApiError: If the Webex cloud returns an error. """ - check_type(recordingId, basestring) - check_type(siteUrl, basestring, optional=True) - check_type(hostEmail, basestring, optional=True) + check_type(recordingId, str) + check_type(siteUrl, str, optional=True) + check_type(hostEmail, str, optional=True) params = dict_from_items_with_values( siteUrl=siteUrl, hostEmail=hostEmail diff --git a/src/webexpythonsdk/api/roles.py b/src/webexpythonsdk/api/roles.py index 75ce62e..87675cf 100644 --- a/src/webexpythonsdk/api/roles.py +++ b/src/webexpythonsdk/api/roles.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- """Webex Roles API wrapper. Copyright (c) 2016-2024 Cisco and/or its affiliates. @@ -22,16 +21,8 @@ SOFTWARE. """ -from __future__ import ( - absolute_import, - division, - print_function, - unicode_literals, -) -from builtins import * -from past.builtins import basestring from ..generator_containers import generator_container from ..restsession import RestSession @@ -101,7 +92,7 @@ def get(self, roleId): """Get the details of a Role, by ID. Args: - roleId(basestring): The ID of the Role to be retrieved. + roleId(str): The ID of the Role to be retrieved. Returns: Role: A Role object with the details of the requested Role. @@ -111,7 +102,7 @@ def get(self, roleId): ApiError: If the Webex cloud returns an error. """ - check_type(roleId, basestring) + check_type(roleId, str) # API request json_data = self._session.get(API_ENDPOINT + "/" + roleId) diff --git a/src/webexpythonsdk/api/room_tabs.py b/src/webexpythonsdk/api/room_tabs.py index ce92fcb..d2cb06f 100644 --- a/src/webexpythonsdk/api/room_tabs.py +++ b/src/webexpythonsdk/api/room_tabs.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- """Webex Room Tabs API wrapper. Copyright (c) 2016-2024 Cisco and/or its affiliates. @@ -22,16 +21,8 @@ SOFTWARE. """ -from __future__ import ( - absolute_import, - division, - print_function, - unicode_literals, -) -from builtins import * -from past.builtins import basestring from ..generator_containers import generator_container from ..restsession import RestSession @@ -86,7 +77,7 @@ def list(self, roomId, **request_parameters): container. Args: - roomId(basestring): List Room Tabs associated with a room, by ID. + roomId(str): List Room Tabs associated with a room, by ID. **request_parameters: Additional request parameters (provides support for parameters that may be added in the future). @@ -99,7 +90,7 @@ def list(self, roomId, **request_parameters): ApiError: If the Webex cloud returns an error. """ - check_type(roomId, basestring) + check_type(roomId, str) params = dict_from_items_with_values( request_parameters, @@ -119,10 +110,10 @@ def create(self, roomId, contentUrl, displayName, **request_parameters): Add a tab with a content url to a room that can be accessed in the room Args: - roomId(basestring): A unique identifier for the room. - contentUrl(basestring): Content Url of the Room Tab. + roomId(str): A unique identifier for the room. + contentUrl(str): Content Url of the Room Tab. Needs to use the https protocol. - displayName(basestring): A user-friendly name for the room. + displayName(str): A user-friendly name for the room. **request_parameters: Additional request parameters (provides support for parameters that may be added in the future). Returns: @@ -133,9 +124,9 @@ def create(self, roomId, contentUrl, displayName, **request_parameters): ApiError: If the Webex cloud returns an error. """ - check_type(roomId, basestring) - check_type(contentUrl, basestring) - check_type(displayName, basestring) + check_type(roomId, str) + check_type(contentUrl, str) + check_type(displayName, str) post_data = dict_from_items_with_values( request_parameters, @@ -154,7 +145,7 @@ def get(self, roomTabId): """Get the details of a room tab, by ID. Args: - roomTabId(basestring): The ID of the room tab to be retrieved. + roomTabId(str): The ID of the room tab to be retrieved. Returns: Room: A RoomTab object with the details of the requested room tab. @@ -164,7 +155,7 @@ def get(self, roomTabId): ApiError: If the Webex cloud returns an error. """ - check_type(roomTabId, basestring) + check_type(roomTabId, str) # API request json_data = self._session.get(API_ENDPOINT + "/" + roomTabId) @@ -178,11 +169,11 @@ def update( """Updates the content url of a Room Tab by ID. Args: - roomTabId(basestring): The unique identifier for the Room Tab. - roomId(basestring): The room ID. - contentUrl(basestring): Content Url of the Room Tab. + roomTabId(str): The unique identifier for the Room Tab. + roomId(str): The room ID. + contentUrl(str): Content Url of the Room Tab. Needs to use the https protocol. - displayName(basestring): A user-friendly name for the room. + displayName(str): A user-friendly name for the room. **request_parameters: Additional request parameters (provides support for parameters that may be added in the future). @@ -194,10 +185,10 @@ def update( ApiError: If the Webex cloud returns an error. """ - check_type(roomTabId, basestring) - check_type(roomId, basestring) - check_type(contentUrl, basestring) - check_type(displayName, basestring) + check_type(roomTabId, str) + check_type(roomId, str) + check_type(contentUrl, str) + check_type(displayName, str) put_data = dict_from_items_with_values( request_parameters, @@ -219,14 +210,14 @@ def delete(self, roomTabId): """Delete a room tab. Args: - roomTabId(basestring): The ID of the room tab to be deleted. + roomTabId(str): The ID of the room tab to be deleted. Raises: TypeError: If the parameter types are incorrect. ApiError: If the Webex cloud returns an error. """ - check_type(roomTabId, basestring) + check_type(roomTabId, str) # API request self._session.delete(API_ENDPOINT + "/" + roomTabId) diff --git a/src/webexpythonsdk/api/rooms.py b/src/webexpythonsdk/api/rooms.py index 32bc7d9..f94dee0 100644 --- a/src/webexpythonsdk/api/rooms.py +++ b/src/webexpythonsdk/api/rooms.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- """Webex Rooms API wrapper. Copyright (c) 2016-2024 Cisco and/or its affiliates. @@ -22,16 +21,8 @@ SOFTWARE. """ -from __future__ import ( - absolute_import, - division, - print_function, - unicode_literals, -) -from builtins import * -from past.builtins import basestring from ..generator_containers import generator_container from ..restsession import RestSession @@ -95,12 +86,12 @@ def list( container. Args: - teamId(basestring): Limit the rooms to those associated with a + teamId(str): Limit the rooms to those associated with a team, by ID. - type(basestring): 'direct' returns all 1-to-1 rooms. `group` + type(str): 'direct' returns all 1-to-1 rooms. `group` returns all group rooms. If not specified or values not matched, will return all room types. - sortBy(basestring): Sort results by room ID (`id`), most recent + sortBy(str): Sort results by room ID (`id`), most recent activity (`lastactivity`), or most recently created (`created`). max(int): Limit the maximum number of items returned from the Webex @@ -117,9 +108,9 @@ def list( ApiError: If the Webex cloud returns an error. """ - check_type(teamId, basestring, optional=True) - check_type(type, basestring, optional=True) - check_type(sortBy, basestring, optional=True) + check_type(teamId, str, optional=True) + check_type(type, str, optional=True) + check_type(sortBy, str, optional=True) check_type(max, int, optional=True) params = dict_from_items_with_values( @@ -153,16 +144,16 @@ def create( The authenticated user is automatically added as a member of the room. Args: - title(basestring): A user-friendly name for the room. - teamId(basestring): The team ID with which this room is + title(str): A user-friendly name for the room. + teamId(str): The team ID with which this room is associated. - classificationId(basestring): The classification ID for the room. + classificationId(str): The classification ID for the room. isLocked(bool): Set the space as locked/moderated and the creator becomes a moderator. isPublic(bool): The room is public and therefore discoverable within the org. Anyone can find and join that room. When `true` the description must be filled in. - description(basestring): The description of the space. + description(str): The description of the space. isAnnouncementOnly(bool): Sets the space into Announcement Mode or clears the Announcement Mode (`false`). **request_parameters: Additional request parameters (provides @@ -176,12 +167,12 @@ def create( ApiError: If the Webex cloud returns an error. """ - check_type(title, basestring) - check_type(teamId, basestring, optional=True) - check_type(classificationId, basestring, optional=True) + check_type(title, str) + check_type(teamId, str, optional=True) + check_type(classificationId, str, optional=True) check_type(isLocked, bool, optional=True) check_type(isPublic, bool, optional=True) - check_type(description, basestring, optional=True) + check_type(description, str, optional=True) check_type(isAnnouncementOnly, bool, optional=True) post_data = dict_from_items_with_values( @@ -200,7 +191,7 @@ def get(self, roomId): """Get the details of a room, by ID. Args: - roomId(basestring): The ID of the room to be retrieved. + roomId(str): The ID of the room to be retrieved. Returns: Room: A Room object with the details of the requested room. @@ -210,7 +201,7 @@ def get(self, roomId): ApiError: If the Webex cloud returns an error. """ - check_type(roomId, basestring) + check_type(roomId, str) # API request json_data = self._session.get(API_ENDPOINT + "/" + roomId) @@ -222,7 +213,7 @@ def get_meeting_info(self, roomId): """Get the meeting details for a room. Args: - roomId(basestring): The unique identifier for the room. + roomId(str): The unique identifier for the room. Returns: RoomMeetingInfo: A Room Meeting Info object with the meeting @@ -234,7 +225,7 @@ def get_meeting_info(self, roomId): ApiError: If the Webex cloud returns an error. """ - check_type(roomId, basestring) + check_type(roomId, str) # API request json_data = self._session.get( @@ -260,10 +251,10 @@ def update( """Update details for a room, by ID. Args: - roomId(basestring): The room ID. - title(basestring): A user-friendly name for the room. - classificationId(basestring): The classification ID for the room. - teamId(basestring): The teamId to which this space should be + roomId(str): The room ID. + title(str): A user-friendly name for the room. + classificationId(str): The classification ID for the room. + teamId(str): The teamId to which this space should be assigned. Only unowned spaces can be assigned to a team. Assignment between teams is unsupported. isLocked(bool): Set the space as locked/moderated and the creator @@ -271,7 +262,7 @@ def update( isPublic(bool): The room is public and therefore discoverable within the org. Anyone can find and join that room. When `true` the description must be filled in. - description(basestring): The description of the space. + description(str): The description of the space. isAnnouncementOnly(bool): Sets the space into Announcement Mode or clears the Announcement Mode (`false`). isReadOnly(bool): A compliance officer can set a direct room as @@ -288,13 +279,13 @@ def update( ApiError: If the Webex cloud returns an error. """ - check_type(roomId, basestring) - check_type(title, basestring) - check_type(classificationId, basestring, optional=True) - check_type(teamId, basestring, optional=True) + check_type(roomId, str) + check_type(title, str) + check_type(classificationId, str, optional=True) + check_type(teamId, str, optional=True) check_type(isLocked, bool, optional=True) check_type(isPublic, bool, optional=True) - check_type(description, basestring, optional=True) + check_type(description, str, optional=True) check_type(isAnnouncementOnly, bool, optional=True) check_type(isReadOnly, bool, optional=True) @@ -322,14 +313,14 @@ def delete(self, roomId): """Delete a room. Args: - roomId(basestring): The ID of the room to be deleted. + roomId(str): The ID of the room to be deleted. Raises: TypeError: If the parameter types are incorrect. ApiError: If the Webex cloud returns an error. """ - check_type(roomId, basestring) + check_type(roomId, str) # API request self._session.delete(API_ENDPOINT + "/" + roomId) diff --git a/src/webexpythonsdk/api/team_memberships.py b/src/webexpythonsdk/api/team_memberships.py index a0cce41..3416680 100644 --- a/src/webexpythonsdk/api/team_memberships.py +++ b/src/webexpythonsdk/api/team_memberships.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- """Webex Memberships API wrapper. Copyright (c) 2016-2024 Cisco and/or its affiliates. @@ -22,16 +21,8 @@ SOFTWARE. """ -from __future__ import ( - absolute_import, - division, - print_function, - unicode_literals, -) -from builtins import * -from past.builtins import basestring from ..generator_containers import generator_container from ..restsession import RestSession @@ -86,7 +77,7 @@ def list(self, teamId, max=100, **request_parameters): the container. Args: - teamId(basestring): List team memberships for a team, by ID. + teamId(str): List team memberships for a team, by ID. max(int): Limit the maximum number of items returned from the Webex service per request. **request_parameters: Additional request parameters (provides @@ -101,7 +92,7 @@ def list(self, teamId, max=100, **request_parameters): ApiError: If the Webex cloud returns an error. """ - check_type(teamId, basestring) + check_type(teamId, str) check_type(max, int, optional=True) params = dict_from_items_with_values( @@ -132,9 +123,9 @@ def create( them a moderator. Args: - teamId(basestring): The team ID. - personId(basestring): The person ID. - personEmail(basestring): The email address of the person. + teamId(str): The team ID. + personId(str): The person ID. + personEmail(str): The email address of the person. isModerator(bool): Set to True to make the person a team moderator. **request_parameters: Additional request parameters (provides support for parameters that may be added in the future). @@ -148,9 +139,9 @@ def create( ApiError: If the Webex cloud returns an error. """ - check_type(teamId, basestring) - check_type(personId, basestring, optional=True) - check_type(personEmail, basestring, optional=True) + check_type(teamId, str) + check_type(personId, str, optional=True) + check_type(personEmail, str, optional=True) check_type(isModerator, bool, optional=True) post_data = dict_from_items_with_values( @@ -171,7 +162,7 @@ def get(self, membershipId): """Get details for a team membership, by ID. Args: - membershipId(basestring): The team membership ID. + membershipId(str): The team membership ID. Returns: TeamMembership: A TeamMembership object with the details of the @@ -182,7 +173,7 @@ def get(self, membershipId): ApiError: If the Webex cloud returns an error. """ - check_type(membershipId, basestring) + check_type(membershipId, str) # API request json_data = self._session.get(API_ENDPOINT + "/" + membershipId) @@ -194,7 +185,7 @@ def update(self, membershipId, isModerator=None, **request_parameters): """Update a team membership, by ID. Args: - membershipId(basestring): The team membership ID. + membershipId(str): The team membership ID. isModerator(bool): Set to True to make the person a team moderator. **request_parameters: Additional request parameters (provides support for parameters that may be added in the future). @@ -208,7 +199,7 @@ def update(self, membershipId, isModerator=None, **request_parameters): ApiError: If the Webex cloud returns an error. """ - check_type(membershipId, basestring) + check_type(membershipId, str) check_type(isModerator, bool, optional=True) put_data = dict_from_items_with_values( @@ -228,14 +219,14 @@ def delete(self, membershipId): """Delete a team membership, by ID. Args: - membershipId(basestring): The team membership ID. + membershipId(str): The team membership ID. Raises: TypeError: If the parameter types are incorrect. ApiError: If the Webex cloud returns an error. """ - check_type(membershipId, basestring) + check_type(membershipId, str) # API request self._session.delete(API_ENDPOINT + "/" + membershipId) diff --git a/src/webexpythonsdk/api/teams.py b/src/webexpythonsdk/api/teams.py index 7bac04b..b6cba66 100644 --- a/src/webexpythonsdk/api/teams.py +++ b/src/webexpythonsdk/api/teams.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- """Webex Teams-API wrapper. Copyright (c) 2016-2024 Cisco and/or its affiliates. @@ -22,16 +21,8 @@ SOFTWARE. """ -from __future__ import ( - absolute_import, - division, - print_function, - unicode_literals, -) -from builtins import * -from past.builtins import basestring from ..generator_containers import generator_container from ..restsession import RestSession @@ -120,7 +111,7 @@ def create(self, name, **request_parameters): The authenticated user is automatically added as a member of the team. Args: - name(basestring): A user-friendly name for the team. + name(str): A user-friendly name for the team. **request_parameters: Additional request parameters (provides support for parameters that may be added in the future). @@ -132,7 +123,7 @@ def create(self, name, **request_parameters): ApiError: If the Webex cloud returns an error. """ - check_type(name, basestring) + check_type(name, str) post_data = dict_from_items_with_values( request_parameters, @@ -149,7 +140,7 @@ def get(self, teamId): """Get the details of a team, by ID. Args: - teamId(basestring): The ID of the team to be retrieved. + teamId(str): The ID of the team to be retrieved. Returns: Team: A Team object with the details of the requested team. @@ -159,7 +150,7 @@ def get(self, teamId): ApiError: If the Webex cloud returns an error. """ - check_type(teamId, basestring) + check_type(teamId, str) # API request json_data = self._session.get(API_ENDPOINT + "/" + teamId) @@ -171,8 +162,8 @@ def update(self, teamId, name, **request_parameters): """Update details for a team, by ID. Args: - teamId(basestring): The team ID. - name(basestring): A user-friendly name for the team. + teamId(str): The team ID. + name(str): A user-friendly name for the team. **request_parameters: Additional request parameters (provides support for parameters that may be added in the future). @@ -184,8 +175,8 @@ def update(self, teamId, name, **request_parameters): ApiError: If the Webex cloud returns an error. """ - check_type(teamId, basestring) - check_type(name, basestring) + check_type(teamId, str) + check_type(name, str) put_data = dict_from_items_with_values( request_parameters, @@ -204,14 +195,14 @@ def delete(self, teamId): """Delete a team. Args: - teamId(basestring): The ID of the team to be deleted. + teamId(str): The ID of the team to be deleted. Raises: TypeError: If the parameter types are incorrect. ApiError: If the Webex cloud returns an error. """ - check_type(teamId, basestring) + check_type(teamId, str) # API request self._session.delete(API_ENDPOINT + "/" + teamId) diff --git a/src/webexpythonsdk/api/webhooks.py b/src/webexpythonsdk/api/webhooks.py index 97420b3..ae63546 100644 --- a/src/webexpythonsdk/api/webhooks.py +++ b/src/webexpythonsdk/api/webhooks.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- """Webex Webhooks API wrapper. Copyright (c) 2016-2024 Cisco and/or its affiliates. @@ -22,16 +21,8 @@ SOFTWARE. """ -from __future__ import ( - absolute_import, - division, - print_function, - unicode_literals, -) -from builtins import * -from past.builtins import basestring from ..generator_containers import generator_container from ..restsession import RestSession @@ -127,13 +118,13 @@ def create( """Create a webhook. Args: - name(basestring): A user-friendly name for this webhook. - targetUrl(basestring): The URL that receives POST requests for + name(str): A user-friendly name for this webhook. + targetUrl(str): The URL that receives POST requests for each event. - resource(basestring): The resource type for the webhook. - event(basestring): The event type for the webhook. - filter(basestring): The filter that defines the webhook scope. - secret(basestring): The secret used to generate payload signature. + resource(str): The resource type for the webhook. + event(str): The event type for the webhook. + filter(str): The filter that defines the webhook scope. + secret(str): The secret used to generate payload signature. **request_parameters: Additional request parameters (provides support for parameters that may be added in the future). @@ -145,12 +136,12 @@ def create( ApiError: If the Webex cloud returns an error. """ - check_type(name, basestring) - check_type(targetUrl, basestring) - check_type(resource, basestring) - check_type(event, basestring) - check_type(filter, basestring, optional=True) - check_type(secret, basestring, optional=True) + check_type(name, str) + check_type(targetUrl, str) + check_type(resource, str) + check_type(event, str) + check_type(filter, str, optional=True) + check_type(secret, str, optional=True) post_data = dict_from_items_with_values( request_parameters, @@ -172,7 +163,7 @@ def get(self, webhookId): """Get the details of a webhook, by ID. Args: - webhookId(basestring): The ID of the webhook to be retrieved. + webhookId(str): The ID of the webhook to be retrieved. Returns: Webhook: A Webhook object with the details of the requested @@ -183,7 +174,7 @@ def get(self, webhookId): ApiError: If the Webex cloud returns an error. """ - check_type(webhookId, basestring) + check_type(webhookId, str) # API request json_data = self._session.get(API_ENDPOINT + "/" + webhookId) @@ -197,9 +188,9 @@ def update( """Update a webhook, by ID. Args: - webhookId(basestring): The webhook ID. - name(basestring): A user-friendly name for this webhook. - targetUrl(basestring): The URL that receives POST requests for + webhookId(str): The webhook ID. + name(str): A user-friendly name for this webhook. + targetUrl(str): The URL that receives POST requests for each event. **request_parameters: Additional request parameters (provides support for parameters that may be added in the future). @@ -213,9 +204,9 @@ def update( ApiError: If the Webex cloud returns an error. """ - check_type(webhookId, basestring) - check_type(name, basestring, optional=True) - check_type(targetUrl, basestring, optional=True) + check_type(webhookId, str) + check_type(name, str, optional=True) + check_type(targetUrl, str, optional=True) put_data = dict_from_items_with_values( request_parameters, @@ -235,14 +226,14 @@ def delete(self, webhookId): """Delete a webhook, by ID. Args: - webhookId(basestring): The ID of the webhook to be deleted. + webhookId(str): The ID of the webhook to be deleted. Raises: TypeError: If the parameter types are incorrect. ApiError: If the Webex cloud returns an error. """ - check_type(webhookId, basestring) + check_type(webhookId, str) # API request self._session.delete(API_ENDPOINT + "/" + webhookId) diff --git a/src/webexpythonsdk/config.py b/src/webexpythonsdk/config.py index 3f37557..4b21fa1 100644 --- a/src/webexpythonsdk/config.py +++ b/src/webexpythonsdk/config.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- """Package configuration. Copyright (c) 2016-2024 Cisco and/or its affiliates. diff --git a/src/webexpythonsdk/environment.py b/src/webexpythonsdk/environment.py index bbf0718..4b9cc34 100644 --- a/src/webexpythonsdk/environment.py +++ b/src/webexpythonsdk/environment.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- """Package environment variables. Copyright (c) 2016-2024 Cisco and/or its affiliates. diff --git a/src/webexpythonsdk/exceptions.py b/src/webexpythonsdk/exceptions.py index 9effb97..1737c6a 100644 --- a/src/webexpythonsdk/exceptions.py +++ b/src/webexpythonsdk/exceptions.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- """Package exceptions. Copyright (c) 2016-2024 Cisco and/or its affiliates. @@ -22,15 +21,8 @@ SOFTWARE. """ -from __future__ import ( - absolute_import, - division, - print_function, - unicode_literals, -) import logging -from builtins import * import requests diff --git a/src/webexpythonsdk/generator_containers.py b/src/webexpythonsdk/generator_containers.py index ca21176..c040ebb 100644 --- a/src/webexpythonsdk/generator_containers.py +++ b/src/webexpythonsdk/generator_containers.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- """GeneratorContainer class makes generator functions safe for reuse. Classes: @@ -29,14 +28,7 @@ SOFTWARE. """ -from __future__ import ( - absolute_import, - division, - print_function, - unicode_literals, -) -from builtins import * import functools import inspect from itertools import islice diff --git a/src/webexpythonsdk/models/cards/__init__.py b/src/webexpythonsdk/models/cards/__init__.py index 0295017..afdc0fc 100644 --- a/src/webexpythonsdk/models/cards/__init__.py +++ b/src/webexpythonsdk/models/cards/__init__.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- """Webex Adaptive Cards data models. Copyright (c) 2016-2024 Cisco and/or its affiliates. diff --git a/src/webexpythonsdk/models/cards/actions.py b/src/webexpythonsdk/models/cards/actions.py index a6add0b..33d0936 100644 --- a/src/webexpythonsdk/models/cards/actions.py +++ b/src/webexpythonsdk/models/cards/actions.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- """Webex Adaptive Card actions. Copyright (c) 2016-2024 Cisco and/or its affiliates. diff --git a/src/webexpythonsdk/models/cards/adaptive_card_component.py b/src/webexpythonsdk/models/cards/adaptive_card_component.py index 3918ba5..d17852f 100644 --- a/src/webexpythonsdk/models/cards/adaptive_card_component.py +++ b/src/webexpythonsdk/models/cards/adaptive_card_component.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- """Webex Adaptive Card Component base class. Copyright (c) 2016-2024 Cisco and/or its affiliates. diff --git a/src/webexpythonsdk/models/cards/card.py b/src/webexpythonsdk/models/cards/card.py index b725593..b2b5901 100644 --- a/src/webexpythonsdk/models/cards/card.py +++ b/src/webexpythonsdk/models/cards/card.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- """Webex Adaptive Card data model. Copyright (c) 2016-2024 Cisco and/or its affiliates. diff --git a/src/webexpythonsdk/models/cards/components.py b/src/webexpythonsdk/models/cards/components.py index d5b4efe..300208c 100644 --- a/src/webexpythonsdk/models/cards/components.py +++ b/src/webexpythonsdk/models/cards/components.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- """Webex Adaptive Card components. Copyright (c) 2016-2024 Cisco and/or its affiliates. diff --git a/src/webexpythonsdk/models/cards/container.py b/src/webexpythonsdk/models/cards/container.py index ad6d2f3..b6d6972 100644 --- a/src/webexpythonsdk/models/cards/container.py +++ b/src/webexpythonsdk/models/cards/container.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- """Webex Adaptive Card container data models. Copyright (c) 2016-2024 Cisco and/or its affiliates. diff --git a/src/webexpythonsdk/models/cards/inputs.py b/src/webexpythonsdk/models/cards/inputs.py index 6d62c6b..4939923 100644 --- a/src/webexpythonsdk/models/cards/inputs.py +++ b/src/webexpythonsdk/models/cards/inputs.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- """Webex Access-Tokens API wrapper. Copyright (c) 2016-2024 Cisco and/or its affiliates. diff --git a/src/webexpythonsdk/models/cards/options.py b/src/webexpythonsdk/models/cards/options.py index 1d67b9f..db691e8 100644 --- a/src/webexpythonsdk/models/cards/options.py +++ b/src/webexpythonsdk/models/cards/options.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- """Webex Adaptive Card options. Copyright (c) 2016-2024 Cisco and/or its affiliates. diff --git a/src/webexpythonsdk/models/cards/utils.py b/src/webexpythonsdk/models/cards/utils.py index 284f573..52c463a 100644 --- a/src/webexpythonsdk/models/cards/utils.py +++ b/src/webexpythonsdk/models/cards/utils.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- """Webex Access-Tokens API wrapper. Copyright (c) 2016-2024 Cisco and/or its affiliates. diff --git a/src/webexpythonsdk/models/dictionary.py b/src/webexpythonsdk/models/dictionary.py index a2ac0e6..7033af0 100644 --- a/src/webexpythonsdk/models/dictionary.py +++ b/src/webexpythonsdk/models/dictionary.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- """Webex data models. Copyright (c) 2016-2024 Cisco and/or its affiliates. @@ -22,12 +21,6 @@ SOFTWARE. """ -from __future__ import ( - absolute_import, - division, - print_function, - unicode_literals, -) from webexpythonsdk.utils import json_dict @@ -36,9 +29,9 @@ def dict_data_factory(model, json_data): """Factory function for creating SimpleDataModel objects. Args: - model(basestring): The data model to use when creating the data + model(str): The data model to use when creating the data object (message, room, membership, etc.). - json_data(basestring, dict): The JSON string or dictionary data with + json_data(str, dict): The JSON string or dictionary data with which to initialize the object. Returns: diff --git a/src/webexpythonsdk/models/immutable.py b/src/webexpythonsdk/models/immutable.py index 0a55946..909897d 100644 --- a/src/webexpythonsdk/models/immutable.py +++ b/src/webexpythonsdk/models/immutable.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- """Model Webex JSON objects as native Python objects. Classes: @@ -29,19 +28,6 @@ SOFTWARE. """ -from __future__ import ( - absolute_import, - absolute_import, - division, - division, - print_function, - print_function, - unicode_literals, - unicode_literals, -) - -from builtins import * - import json from collections import defaultdict @@ -82,7 +68,7 @@ def __init__(self, json_data): """Init a new ImmutableData object from a dictionary or JSON string. Args: - json_data(dict, basestring): Input JSON string or dictionary. + json_data(dict, str): Input JSON string or dictionary. Raises: TypeError: If the input object is not a dictionary or string. @@ -342,9 +328,9 @@ def immutable_data_factory(model, json_data): """Factory function for creating ImmutableData objects. Args: - model(basestring): The data model to use when creating the + model(str): The data model to use when creating the ImmutableData object (message, room, membership, etc.). - json_data(basestring, dict): The JSON string or dictionary data with + json_data(str, dict): The JSON string or dictionary data with which to initialize the object. Returns: diff --git a/src/webexpythonsdk/models/mixins/access_token.py b/src/webexpythonsdk/models/mixins/access_token.py index 657b4ad..320f68d 100644 --- a/src/webexpythonsdk/models/mixins/access_token.py +++ b/src/webexpythonsdk/models/mixins/access_token.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- """Webex Access-Token data model. Copyright (c) 2016-2024 Cisco and/or its affiliates. @@ -22,14 +21,7 @@ SOFTWARE. """ -from __future__ import ( - absolute_import, - division, - print_function, - unicode_literals, -) -from builtins import * class AccessTokenBasicPropertiesMixin(object): diff --git a/src/webexpythonsdk/models/mixins/admin_audit_event.py b/src/webexpythonsdk/models/mixins/admin_audit_event.py index d9eefc3..5961e79 100644 --- a/src/webexpythonsdk/models/mixins/admin_audit_event.py +++ b/src/webexpythonsdk/models/mixins/admin_audit_event.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- """Webex Webhook-Event data model. Copyright (c) 2016-2024 Cisco and/or its affiliates. @@ -22,14 +21,7 @@ SOFTWARE. """ -from __future__ import ( - absolute_import, - division, - print_function, - unicode_literals, -) -from builtins import * from webexpythonsdk.utils import WebexDateTime diff --git a/src/webexpythonsdk/models/mixins/attachment_action.py b/src/webexpythonsdk/models/mixins/attachment_action.py index 34eaa32..f769fa9 100644 --- a/src/webexpythonsdk/models/mixins/attachment_action.py +++ b/src/webexpythonsdk/models/mixins/attachment_action.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- """Webex Message data model. Copyright (c) 2016-2024 Cisco and/or its affiliates. @@ -22,14 +21,7 @@ SOFTWARE. """ -from __future__ import ( - absolute_import, - division, - print_function, - unicode_literals, -) -from builtins import * from webexpythonsdk.utils import WebexDateTime diff --git a/src/webexpythonsdk/models/mixins/event.py b/src/webexpythonsdk/models/mixins/event.py index 33a5426..0c5743a 100644 --- a/src/webexpythonsdk/models/mixins/event.py +++ b/src/webexpythonsdk/models/mixins/event.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- """Webex Event data model. Copyright (c) 2016-2024 Cisco and/or its affiliates. @@ -22,14 +21,7 @@ SOFTWARE. """ -from __future__ import ( - absolute_import, - division, - print_function, - unicode_literals, -) -from builtins import * from webexpythonsdk.utils import WebexDateTime diff --git a/src/webexpythonsdk/models/mixins/guest_issuer_token.py b/src/webexpythonsdk/models/mixins/guest_issuer_token.py index ac3624a..4bc0059 100644 --- a/src/webexpythonsdk/models/mixins/guest_issuer_token.py +++ b/src/webexpythonsdk/models/mixins/guest_issuer_token.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- """Webex Guest-Issuer data model. Copyright (c) 2016-2024 Cisco and/or its affiliates. @@ -22,14 +21,7 @@ SOFTWARE. """ -from __future__ import ( - absolute_import, - division, - print_function, - unicode_literals, -) -from builtins import * class GuestIssuerTokenBasicPropertiesMixin(object): diff --git a/src/webexpythonsdk/models/mixins/license.py b/src/webexpythonsdk/models/mixins/license.py index ae44443..31645b8 100644 --- a/src/webexpythonsdk/models/mixins/license.py +++ b/src/webexpythonsdk/models/mixins/license.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- """Webex License data model. Copyright (c) 2016-2024 Cisco and/or its affiliates. @@ -22,14 +21,7 @@ SOFTWARE. """ -from __future__ import ( - absolute_import, - division, - print_function, - unicode_literals, -) -from builtins import * class LicenseBasicPropertiesMixin(object): diff --git a/src/webexpythonsdk/models/mixins/meeting_invitees.py b/src/webexpythonsdk/models/mixins/meeting_invitees.py index 5c21d1b..1a95164 100644 --- a/src/webexpythonsdk/models/mixins/meeting_invitees.py +++ b/src/webexpythonsdk/models/mixins/meeting_invitees.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- """Webex MeetingInvitees data model. Copyright (c) 2016-2024 Cisco and/or its affiliates. @@ -22,14 +21,7 @@ SOFTWARE. """ -from __future__ import ( - absolute_import, - division, - print_function, - unicode_literals, -) -from builtins import * class MeetingInviteeBasicPropertiesMixin(object): diff --git a/src/webexpythonsdk/models/mixins/meeting_registrants.py b/src/webexpythonsdk/models/mixins/meeting_registrants.py index 4ab4bfe..b8cbd4a 100644 --- a/src/webexpythonsdk/models/mixins/meeting_registrants.py +++ b/src/webexpythonsdk/models/mixins/meeting_registrants.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- """Webex MeetingRegistrants data model. Copyright (c) 2016-2024 Cisco and/or its affiliates. @@ -22,14 +21,7 @@ SOFTWARE. """ -from __future__ import ( - absolute_import, - division, - print_function, - unicode_literals, -) -from builtins import * class MeetingRegistrantBasicPropertiesMixin(object): diff --git a/src/webexpythonsdk/models/mixins/meeting_templates.py b/src/webexpythonsdk/models/mixins/meeting_templates.py index 70f5e45..63bc94d 100644 --- a/src/webexpythonsdk/models/mixins/meeting_templates.py +++ b/src/webexpythonsdk/models/mixins/meeting_templates.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- """Webex MeetingTemplates data model. Copyright (c) 2016-2024 Cisco and/or its affiliates. @@ -22,14 +21,7 @@ SOFTWARE. """ -from __future__ import ( - absolute_import, - division, - print_function, - unicode_literals, -) -from builtins import * class MeetingTemplateBasicPropertiesMixin(object): diff --git a/src/webexpythonsdk/models/mixins/meetings.py b/src/webexpythonsdk/models/mixins/meetings.py index 67b7cda..76f8035 100644 --- a/src/webexpythonsdk/models/mixins/meetings.py +++ b/src/webexpythonsdk/models/mixins/meetings.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- """Webex Meetings data model. Copyright (c) 2016-2024 Cisco and/or its affiliates. @@ -22,14 +21,7 @@ SOFTWARE. """ -from __future__ import ( - absolute_import, - division, - print_function, - unicode_literals, -) -from builtins import * class MeetingBasicPropertiesMixin(object): diff --git a/src/webexpythonsdk/models/mixins/membership.py b/src/webexpythonsdk/models/mixins/membership.py index 94b1ee5..f8756b4 100644 --- a/src/webexpythonsdk/models/mixins/membership.py +++ b/src/webexpythonsdk/models/mixins/membership.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- """Webex Membership data model. Copyright (c) 2016-2024 Cisco and/or its affiliates. @@ -22,14 +21,7 @@ SOFTWARE. """ -from __future__ import ( - absolute_import, - division, - print_function, - unicode_literals, -) -from builtins import * import warnings diff --git a/src/webexpythonsdk/models/mixins/message.py b/src/webexpythonsdk/models/mixins/message.py index 33d2c35..a2dbf6b 100644 --- a/src/webexpythonsdk/models/mixins/message.py +++ b/src/webexpythonsdk/models/mixins/message.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- """Webex Message data model. Copyright (c) 2016-2024 Cisco and/or its affiliates. @@ -22,14 +21,7 @@ SOFTWARE. """ -from __future__ import ( - absolute_import, - division, - print_function, - unicode_literals, -) -from builtins import * from webexpythonsdk.utils import WebexDateTime diff --git a/src/webexpythonsdk/models/mixins/organization.py b/src/webexpythonsdk/models/mixins/organization.py index 21d9630..e4c27a3 100644 --- a/src/webexpythonsdk/models/mixins/organization.py +++ b/src/webexpythonsdk/models/mixins/organization.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- """Webex Organization data model. Copyright (c) 2016-2024 Cisco and/or its affiliates. @@ -22,14 +21,7 @@ SOFTWARE. """ -from __future__ import ( - absolute_import, - division, - print_function, - unicode_literals, -) -from builtins import * from webexpythonsdk.utils import WebexDateTime diff --git a/src/webexpythonsdk/models/mixins/person.py b/src/webexpythonsdk/models/mixins/person.py index 0ea01c7..ff22eef 100644 --- a/src/webexpythonsdk/models/mixins/person.py +++ b/src/webexpythonsdk/models/mixins/person.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- """Webex Person data model. Copyright (c) 2016-2024 Cisco and/or its affiliates. @@ -22,14 +21,7 @@ SOFTWARE. """ -from __future__ import ( - absolute_import, - division, - print_function, - unicode_literals, -) -from builtins import * from webexpythonsdk.utils import WebexDateTime diff --git a/src/webexpythonsdk/models/mixins/recording.py b/src/webexpythonsdk/models/mixins/recording.py index a66b111..0932076 100644 --- a/src/webexpythonsdk/models/mixins/recording.py +++ b/src/webexpythonsdk/models/mixins/recording.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- """Webex Recording data model. Copyright (c) 2016-2024 Cisco and/or its affiliates. @@ -22,14 +21,7 @@ SOFTWARE. """ -from __future__ import ( - absolute_import, - division, - print_function, - unicode_literals, -) -from builtins import * from webexpythonsdk.utils import WebexDateTime diff --git a/src/webexpythonsdk/models/mixins/role.py b/src/webexpythonsdk/models/mixins/role.py index a55414d..ea909e8 100644 --- a/src/webexpythonsdk/models/mixins/role.py +++ b/src/webexpythonsdk/models/mixins/role.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- """Webex Role data model. Copyright (c) 2016-2024 Cisco and/or its affiliates. @@ -22,14 +21,7 @@ SOFTWARE. """ -from __future__ import ( - absolute_import, - division, - print_function, - unicode_literals, -) -from builtins import * class RoleBasicPropertiesMixin(object): diff --git a/src/webexpythonsdk/models/mixins/room.py b/src/webexpythonsdk/models/mixins/room.py index 825c9e4..9a7be37 100644 --- a/src/webexpythonsdk/models/mixins/room.py +++ b/src/webexpythonsdk/models/mixins/room.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- """Webex Room data model. Copyright (c) 2016-2024 Cisco and/or its affiliates. @@ -22,14 +21,7 @@ SOFTWARE. """ -from __future__ import ( - absolute_import, - division, - print_function, - unicode_literals, -) -from builtins import * from webexpythonsdk.utils import WebexDateTime diff --git a/src/webexpythonsdk/models/mixins/room_meeting_info.py b/src/webexpythonsdk/models/mixins/room_meeting_info.py index f636737..34e1692 100644 --- a/src/webexpythonsdk/models/mixins/room_meeting_info.py +++ b/src/webexpythonsdk/models/mixins/room_meeting_info.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- """Webex Room Meeting Info data model. Copyright (c) 2016-2024 Cisco and/or its affiliates. @@ -22,14 +21,7 @@ SOFTWARE. """ -from __future__ import ( - absolute_import, - division, - print_function, - unicode_literals, -) -from builtins import * class RoomMeetingInfoBasicPropertiesMixin(object): diff --git a/src/webexpythonsdk/models/mixins/room_tab.py b/src/webexpythonsdk/models/mixins/room_tab.py index 0aa9898..7a3a542 100644 --- a/src/webexpythonsdk/models/mixins/room_tab.py +++ b/src/webexpythonsdk/models/mixins/room_tab.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- """Webex Room data model. Copyright (c) 2016-2024 Cisco and/or its affiliates. @@ -22,14 +21,7 @@ SOFTWARE. """ -from __future__ import ( - absolute_import, - division, - print_function, - unicode_literals, -) -from builtins import * from webexpythonsdk.utils import WebexDateTime diff --git a/src/webexpythonsdk/models/mixins/team.py b/src/webexpythonsdk/models/mixins/team.py index 9006fcf..ef75bf4 100644 --- a/src/webexpythonsdk/models/mixins/team.py +++ b/src/webexpythonsdk/models/mixins/team.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- """Webex Team data model. Copyright (c) 2016-2024 Cisco and/or its affiliates. @@ -22,14 +21,7 @@ SOFTWARE. """ -from __future__ import ( - absolute_import, - division, - print_function, - unicode_literals, -) -from builtins import * from webexpythonsdk.utils import WebexDateTime diff --git a/src/webexpythonsdk/models/mixins/team_membership.py b/src/webexpythonsdk/models/mixins/team_membership.py index 1e8b272..f520e6d 100644 --- a/src/webexpythonsdk/models/mixins/team_membership.py +++ b/src/webexpythonsdk/models/mixins/team_membership.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- """Webex Team-Membership data model. Copyright (c) 2016-2024 Cisco and/or its affiliates. @@ -22,14 +21,7 @@ SOFTWARE. """ -from __future__ import ( - absolute_import, - division, - print_function, - unicode_literals, -) -from builtins import * from webexpythonsdk.utils import WebexDateTime diff --git a/src/webexpythonsdk/models/mixins/webhook.py b/src/webexpythonsdk/models/mixins/webhook.py index e5fbe91..3cb9019 100644 --- a/src/webexpythonsdk/models/mixins/webhook.py +++ b/src/webexpythonsdk/models/mixins/webhook.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- """Webex Webhook data model. Copyright (c) 2016-2024 Cisco and/or its affiliates. @@ -22,14 +21,7 @@ SOFTWARE. """ -from __future__ import ( - absolute_import, - division, - print_function, - unicode_literals, -) -from builtins import * from webexpythonsdk.utils import WebexDateTime diff --git a/src/webexpythonsdk/models/mixins/webhook_event.py b/src/webexpythonsdk/models/mixins/webhook_event.py index 52a6cf3..043cd8f 100644 --- a/src/webexpythonsdk/models/mixins/webhook_event.py +++ b/src/webexpythonsdk/models/mixins/webhook_event.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- """Webex Webhook-Event data model. Copyright (c) 2016-2024 Cisco and/or its affiliates. @@ -22,14 +21,7 @@ SOFTWARE. """ -from __future__ import ( - absolute_import, - division, - print_function, - unicode_literals, -) -from builtins import * class WebhookEventBasicPropertiesMixin(object): diff --git a/src/webexpythonsdk/models/simple.py b/src/webexpythonsdk/models/simple.py index b5d1ddb..b79b8a7 100644 --- a/src/webexpythonsdk/models/simple.py +++ b/src/webexpythonsdk/models/simple.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- """Simple data model; models Webex JSON objects as simple Python objects. Classes: @@ -29,15 +28,8 @@ SOFTWARE. """ -from __future__ import ( - absolute_import, - division, - print_function, - unicode_literals, -) import json -from builtins import * from webexpythonsdk.utils import json_dict @@ -49,7 +41,7 @@ def __init__(self, json_data): """Init a new SimpleDataModel object from a dictionary or JSON string. Args: - json_data(dict, basestring): Input JSON string or dictionary. + json_data(dict, str): Input JSON string or dictionary. Raises: TypeError: If the input object is not a dictionary or string. @@ -74,9 +66,9 @@ def simple_data_factory(model, json_data): """Factory function for creating SimpleDataModel objects. Args: - model(basestring): The data model to use when creating the data + model(str): The data model to use when creating the data object (message, room, membership, etc.). - json_data(basestring, dict): The JSON string or dictionary data with + json_data(str, dict): The JSON string or dictionary data with which to initialize the object. Returns: diff --git a/src/webexpythonsdk/response_codes.py b/src/webexpythonsdk/response_codes.py index bad7b32..bebdbaa 100644 --- a/src/webexpythonsdk/response_codes.py +++ b/src/webexpythonsdk/response_codes.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- """Webex Response Codes. Copyright (c) 2016-2024 Cisco and/or its affiliates. @@ -22,12 +21,6 @@ SOFTWARE. """ -from __future__ import ( - absolute_import, - division, - print_function, - unicode_literals, -) RESPONSE_CODES = { diff --git a/src/webexpythonsdk/restsession.py b/src/webexpythonsdk/restsession.py index 46f0423..3dfe238 100644 --- a/src/webexpythonsdk/restsession.py +++ b/src/webexpythonsdk/restsession.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- """RestSession class for creating connections to the Webex APIs. Copyright (c) 2016-2024 Cisco and/or its affiliates. @@ -22,18 +21,9 @@ SOFTWARE. """ -from __future__ import ( - absolute_import, - division, - print_function, - unicode_literals, -) -from builtins import * -from future import standard_library -standard_library.install_aliases() import json import logging @@ -45,7 +35,6 @@ import warnings import requests -from past.builtins import basestring from ._metadata import __title__, __version__ from .config import DEFAULT_SINGLE_REQUEST_TIMEOUT, DEFAULT_WAIT_ON_RATE_LIMIT @@ -73,10 +62,10 @@ def _fix_next_url(next_url, params): This patch parses the next_url to remove the max=null parameter. Args: - next_url(basestring): The "next" URL to be parsed and cleaned. + next_url(str): The "next" URL to be parsed and cleaned. Returns: - basestring: The clean URL to be used for the "next" request. + str: The clean URL to be used for the "next" request. Raises: AssertionError: If the parameter types are incorrect. @@ -200,9 +189,9 @@ def __init__( """Initialize a new RestSession object. Args: - access_token(basestring): The Webex access token to be used + access_token(str): The Webex access token to be used for this session. - base_url(basestring): The base URL that will be suffixed onto API + base_url(str): The base URL that will be suffixed onto API endpoint relative URLs to produce a callable absolute URL. single_request_timeout(int): The timeout (seconds) for a single HTTP REST API request. @@ -210,10 +199,10 @@ def __init__( handling. proxies(dict): Dictionary of proxies passed on to the requests session. - be_geo_id(basestring): Optional partner identifier for API usage + be_geo_id(str): Optional partner identifier for API usage tracking. Defaults to checking for a BE_GEO_ID environment variable. - caller(basestring): Optional identifier for API usage tracking. + caller(str): Optional identifier for API usage tracking. Defaults to checking for a WEBEX_PYTHON_SDK_CALLER environment variable. disable_ssl_verify(bool): Optional boolean flag to disable ssl @@ -224,8 +213,8 @@ def __init__( TypeError: If the parameter types are incorrect. """ - check_type(access_token, basestring) - check_type(base_url, basestring) + check_type(access_token, str) + check_type(base_url, str) check_type(single_request_timeout, int, optional=True) check_type(wait_on_rate_limit, bool) check_type(proxies, dict, optional=True) @@ -323,7 +312,7 @@ def abs_url(self, url): """Given a relative or absolute URL; return an absolute URL. Args: - url(basestring): A relative or absolute URL. + url(str): A relative or absolute URL. Returns: str: An absolute URL. @@ -347,8 +336,8 @@ def request(self, method, url, erc, **kwargs): * Inspects response codes and raises exceptions as appropriate Args: - method(basestring): The request-method type ("GET", "POST", etc.). - url(basestring): The URL of the API endpoint to be called. + method(str): The request-method type ("GET", "POST", etc.). + url(str): The URL of the API endpoint to be called. erc(int): The expected response code that should be returned by the Webex API endpoint to indicate success. **kwargs: Passed on to the requests package. @@ -388,7 +377,7 @@ def get(self, url, params=None, **kwargs): """Sends a GET request. Args: - url(basestring): The URL of the API endpoint. + url(str): The URL of the API endpoint. params(dict): The parameters for the HTTP GET request. **kwargs: erc(int): The expected (success) response code for the request. @@ -399,7 +388,7 @@ def get(self, url, params=None, **kwargs): returned by the Webex API endpoint. """ - check_type(url, basestring) + check_type(url, str) check_type(params, dict, optional=True) # Expected response code @@ -414,7 +403,7 @@ def get_pages(self, url, params=None, **kwargs): Provides native support for RFC5988 Web Linking. Args: - url(basestring): The URL of the API endpoint. + url(str): The URL of the API endpoint. params(dict): The parameters for the HTTP GET request. **kwargs: erc(int): The expected (success) response code for the request. @@ -425,7 +414,7 @@ def get_pages(self, url, params=None, **kwargs): returned by the Webex API endpoint. """ - check_type(url, basestring) + check_type(url, str) check_type(params, dict, optional=True) # Expected response code @@ -463,7 +452,7 @@ def get_items(self, url, params=None, **kwargs): been returned. Args: - url(basestring): The URL of the API endpoint. + url(str): The URL of the API endpoint. params(dict): The parameters for the HTTP GET request. **kwargs: erc(int): The expected (success) response code for the request. @@ -500,7 +489,7 @@ def post(self, url, json=None, data=None, **kwargs): """Sends a POST request. Args: - url(basestring): The URL of the API endpoint. + url(str): The URL of the API endpoint. json: Data to be sent in JSON format in tbe body of the request. data: Data to be sent in the body of the request. **kwargs: @@ -512,7 +501,7 @@ def post(self, url, json=None, data=None, **kwargs): returned by the Webex API endpoint. """ - check_type(url, basestring) + check_type(url, str) # Expected response code erc = kwargs.pop("erc", EXPECTED_RESPONSE_CODE["POST"]) @@ -526,7 +515,7 @@ def put(self, url, json=None, data=None, **kwargs): """Sends a PUT request. Args: - url(basestring): The URL of the API endpoint. + url(str): The URL of the API endpoint. json: Data to be sent in JSON format in tbe body of the request. data: Data to be sent in the body of the request. **kwargs: @@ -538,7 +527,7 @@ def put(self, url, json=None, data=None, **kwargs): returned by the Webex API endpoint. """ - check_type(url, basestring) + check_type(url, str) # Expected response code erc = kwargs.pop("erc", EXPECTED_RESPONSE_CODE["PUT"]) @@ -552,7 +541,7 @@ def delete(self, url, **kwargs): """Sends a DELETE request. Args: - url(basestring): The URL of the API endpoint. + url(str): The URL of the API endpoint. **kwargs: erc(int): The expected (success) response code for the request. others: Passed on to the requests package. @@ -562,7 +551,7 @@ def delete(self, url, **kwargs): returned by the Webex API endpoint. """ - check_type(url, basestring) + check_type(url, str) # Expected response code erc = kwargs.pop("erc", EXPECTED_RESPONSE_CODE["DELETE"]) diff --git a/src/webexpythonsdk/utils.py b/src/webexpythonsdk/utils.py index a3e55aa..7bb8737 100644 --- a/src/webexpythonsdk/utils.py +++ b/src/webexpythonsdk/utils.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- """Package helper functions and classes. Copyright (c) 2016-2024 Cisco and/or its affiliates. @@ -22,16 +21,8 @@ SOFTWARE. """ -from __future__ import ( - absolute_import, - division, - print_function, - unicode_literals, -) -from future import standard_library -standard_library.install_aliases() native_str = str import json @@ -40,11 +31,9 @@ import sys import urllib.parse import warnings -from builtins import * from collections import namedtuple, OrderedDict from datetime import datetime, timedelta, tzinfo -from past.builtins import basestring from .config import WEBEX_DATETIME_FORMAT from .exceptions import ( @@ -61,7 +50,7 @@ def to_unicode(string): """Convert a string (bytes, str or unicode) to unicode.""" - assert isinstance(string, basestring) + assert isinstance(string, str) if sys.version_info[0] >= 3: if isinstance(string, bytes): return string.decode("utf-8") @@ -76,7 +65,7 @@ def to_unicode(string): def to_bytes(string): """Convert a string (bytes, str or unicode) to bytes.""" - assert isinstance(string, basestring) + assert isinstance(string, str) if sys.version_info[0] >= 3: if isinstance(string, str): return string.encode("utf-8") @@ -104,7 +93,7 @@ def validate_base_url(base_url): def is_web_url(string): """Check to see if string is an validly-formatted web url.""" - assert isinstance(string, basestring) + assert isinstance(string, str) parsed_url = urllib.parse.urlparse(string) return ( parsed_url.scheme.lower() == "http" @@ -114,13 +103,13 @@ def is_web_url(string): def is_local_file(string): """Check to see if string is a valid local file path.""" - assert isinstance(string, basestring) + assert isinstance(string, str) return os.path.isfile(string) def open_local_file(file_path): """Open the file and return an EncodableFile tuple.""" - assert isinstance(file_path, basestring) + assert isinstance(file_path, str) assert is_local_file(file_path) file_name = os.path.basename(file_path) file_object = open(file_path, "rb") @@ -251,7 +240,7 @@ def json_dict(json_data): """ if isinstance(json_data, dict): return json_data - elif isinstance(json_data, basestring): + elif isinstance(json_data, str): return json.loads(json_data, object_hook=OrderedDict) else: raise TypeError( diff --git a/tests/__init__.py b/tests/__init__.py index 40a96af..e69de29 100644 --- a/tests/__init__.py +++ b/tests/__init__.py @@ -1 +0,0 @@ -# -*- coding: utf-8 -*- diff --git a/tests/api/__init__.py b/tests/api/__init__.py index b3f244e..69aeff4 100644 --- a/tests/api/__init__.py +++ b/tests/api/__init__.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- """WebexAPI fixtures and tests. Copyright (c) 2016-2024 Cisco and/or its affiliates. diff --git a/tests/api/test_admin_audit_events.py b/tests/api/test_admin_audit_events.py index 906af42..f78d03c 100644 --- a/tests/api/test_admin_audit_events.py +++ b/tests/api/test_admin_audit_events.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- """WebexAPI Admin Audit Events API fixtures and tests. Copyright (c) 2016-2024 Cisco and/or its affiliates. diff --git a/tests/api/test_attachment_actions.py b/tests/api/test_attachment_actions.py index 04d09f2..4def51d 100644 --- a/tests/api/test_attachment_actions.py +++ b/tests/api/test_attachment_actions.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- """WebexAPI Messages API fixtures and tests. Copyright (c) 2016-2024 Cisco and/or its affiliates. diff --git a/tests/api/test_events.py b/tests/api/test_events.py index 943630f..999a5fa 100644 --- a/tests/api/test_events.py +++ b/tests/api/test_events.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- """WebexAPI Events API fixtures and tests. Copyright (c) 2016-2024 Cisco and/or its affiliates. diff --git a/tests/api/test_guest_issuer.py b/tests/api/test_guest_issuer.py index ba50367..fa90228 100644 --- a/tests/api/test_guest_issuer.py +++ b/tests/api/test_guest_issuer.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- """WebexAPI Licenses API fixtures and tests. Copyright (c) 2016-2024 Cisco and/or its affiliates. diff --git a/tests/api/test_licenses.py b/tests/api/test_licenses.py index cedf187..145d339 100644 --- a/tests/api/test_licenses.py +++ b/tests/api/test_licenses.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- """WebexAPI Licenses API fixtures and tests. Copyright (c) 2016-2024 Cisco and/or its affiliates. diff --git a/tests/api/test_meeting_registrants.py b/tests/api/test_meeting_registrants.py index e5aca17..4ab40dd 100644 --- a/tests/api/test_meeting_registrants.py +++ b/tests/api/test_meeting_registrants.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- """WebexAPI MeetingRegistrants API fixtures and tests. Copyright (c) 2016-2024 Cisco and/or its affiliates. diff --git a/tests/api/test_meetings.py b/tests/api/test_meetings.py index ed7216b..28424a8 100644 --- a/tests/api/test_meetings.py +++ b/tests/api/test_meetings.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- """WebexAPI Meetings API fixtures and tests. Copyright (c) 2016-2024 Cisco and/or its affiliates. diff --git a/tests/api/test_memberships.py b/tests/api/test_memberships.py index a038be8..fa146d3 100644 --- a/tests/api/test_memberships.py +++ b/tests/api/test_memberships.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- """WebexAPI Memberships API fixtures and tests. Copyright (c) 2016-2024 Cisco and/or its affiliates. diff --git a/tests/api/test_messages.py b/tests/api/test_messages.py index 37f6b9f..1c40feb 100644 --- a/tests/api/test_messages.py +++ b/tests/api/test_messages.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- """WebexAPI Messages API fixtures and tests. Copyright (c) 2016-2024 Cisco and/or its affiliates. diff --git a/tests/api/test_organizations.py b/tests/api/test_organizations.py index 94bec38..e0310d8 100644 --- a/tests/api/test_organizations.py +++ b/tests/api/test_organizations.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- """WebexAPI Organizations API fixtures and tests. Copyright (c) 2016-2024 Cisco and/or its affiliates. diff --git a/tests/api/test_people.py b/tests/api/test_people.py index 6c3c539..abd18a3 100644 --- a/tests/api/test_people.py +++ b/tests/api/test_people.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- """WebexAPI People API fixtures and tests. Copyright (c) 2016-2024 Cisco and/or its affiliates. diff --git a/tests/api/test_recordings.py b/tests/api/test_recordings.py index 6899733..09aad8d 100644 --- a/tests/api/test_recordings.py +++ b/tests/api/test_recordings.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- """WebexAPI Recordings API fixtures and tests. Copyright (c) 2016-2024 Cisco and/or its affiliates. diff --git a/tests/api/test_roles.py b/tests/api/test_roles.py index c1905db..b1bae2a 100644 --- a/tests/api/test_roles.py +++ b/tests/api/test_roles.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- """WebexAPI Roles API fixtures and tests. Copyright (c) 2016-2024 Cisco and/or its affiliates. diff --git a/tests/api/test_room_tabs.py b/tests/api/test_room_tabs.py index 4535568..46a44f6 100644 --- a/tests/api/test_room_tabs.py +++ b/tests/api/test_room_tabs.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- """WebexAPI Rooms API fixtures and tests. Copyright (c) 2016-2024 Cisco and/or its affiliates. diff --git a/tests/api/test_rooms.py b/tests/api/test_rooms.py index 10b822e..9e69199 100644 --- a/tests/api/test_rooms.py +++ b/tests/api/test_rooms.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- """WebexAPI Rooms API fixtures and tests. Copyright (c) 2016-2024 Cisco and/or its affiliates. diff --git a/tests/api/test_teammemberships.py b/tests/api/test_teammemberships.py index 58c8b3a..b4f037e 100644 --- a/tests/api/test_teammemberships.py +++ b/tests/api/test_teammemberships.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- """WebexAPI Team Memberships API fixtures and tests. Copyright (c) 2016-2024 Cisco and/or its affiliates. diff --git a/tests/api/test_teams.py b/tests/api/test_teams.py index 16a91d7..8474d1b 100644 --- a/tests/api/test_teams.py +++ b/tests/api/test_teams.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- """WebexAPI Team API fixtures and tests. Copyright (c) 2016-2024 Cisco and/or its affiliates. diff --git a/tests/conftest.py b/tests/conftest.py index 04e4de8..9aa9318 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- """pytest configuration and top-level fixtures. Copyright (c) 2016-2024 Cisco and/or its affiliates. diff --git a/tests/environment.py b/tests/environment.py index 78cc9d6..6a82938 100644 --- a/tests/environment.py +++ b/tests/environment.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- """Test suite environment variables. Copyright (c) 2016-2024 Cisco and/or its affiliates. diff --git a/tests/test_restsession.py b/tests/test_restsession.py index 12e9124..4e694a4 100644 --- a/tests/test_restsession.py +++ b/tests/test_restsession.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- """webexpythonsdk/restsession.py Fixtures & Tests Copyright (c) 2016-2024 Cisco and/or its affiliates. diff --git a/tests/test_webexteamssdk.py b/tests/test_webexteamssdk.py index c0c3dcd..4dd4f81 100644 --- a/tests/test_webexteamssdk.py +++ b/tests/test_webexteamssdk.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- """Test suite for the community-developed Python SDK for the Webex APIs. Copyright (c) 2016-2024 Cisco and/or its affiliates. diff --git a/tests/utils.py b/tests/utils.py index 0005949..fca7c3c 100644 --- a/tests/utils.py +++ b/tests/utils.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- """Test utilities, helper functions, and classes. Copyright (c) 2016-2024 Cisco and/or its affiliates. From 3b5ddaddc5bd40094316b036bd7b6e87272a2878 Mon Sep 17 00:00:00 2001 From: Chris Lunsford Date: Thu, 20 Jun 2024 19:24:47 -0400 Subject: [PATCH 07/22] Remove .decode("utf-8") on Guest Issuer jwt_token --- src/webexpythonsdk/api/guest_issuer.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/webexpythonsdk/api/guest_issuer.py b/src/webexpythonsdk/api/guest_issuer.py index de9c67e..3e39112 100644 --- a/src/webexpythonsdk/api/guest_issuer.py +++ b/src/webexpythonsdk/api/guest_issuer.py @@ -106,10 +106,7 @@ def create(self, sub, name, iss, exp, secret): key = base64.b64decode(secret) jwt_token = jwt.encode(payload, key, algorithm="HS256") - # TODO: Remove `.decode("utf-8")` when Python 2 is no longer supported - # v1.7.1 is the last release of PyJWT that supports Python 2, and it - # returns a byte string for the JWT token. - headers = {"Authorization": "Bearer " + jwt_token.decode("utf-8")} + headers = {"Authorization": "Bearer " + jwt_token} json_data = self._session.post( API_ENDPOINT + "/" + "login", headers=headers From 5a85e1aef583a05456fc6aa1e414f78b27ef0fc6 Mon Sep 17 00:00:00 2001 From: Chris Lunsford Date: Thu, 20 Jun 2024 19:54:20 -0400 Subject: [PATCH 08/22] refactor: Remove scripts, Add Makefile --- Makefile | 41 +++++++++++++++++++++ script/README.md | 75 --------------------------------------- script/build | 52 --------------------------- script/ci | 23 ------------ script/clean | 70 ------------------------------------ script/console | 13 ------- script/installdeps | 41 --------------------- script/ipython_console.py | 14 -------- script/setup | 15 -------- script/test | 69 ----------------------------------- script/update | 23 ------------ 11 files changed, 41 insertions(+), 395 deletions(-) create mode 100644 Makefile delete mode 100644 script/README.md delete mode 100755 script/build delete mode 100755 script/ci delete mode 100755 script/clean delete mode 100755 script/console delete mode 100755 script/installdeps delete mode 100755 script/ipython_console.py delete mode 100755 script/setup delete mode 100755 script/test delete mode 100755 script/update diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..57c69c1 --- /dev/null +++ b/Makefile @@ -0,0 +1,41 @@ +.PHONY: clean setup format lint build tests tests-manual tests-slow tests-all docs + +clean: + find . -name '*.pyc' -exec rm -f {} + + find . -name '*.pyo' -exec rm -f {} + + find . -name '*~' -exec rm -f {} + + find . -name '__pycache__' -exec rm -fr {} + + rm -rf build/ + rm -rf dist/ + rm -rf .cache/ + rm -f .coverage + rm -rf .pytest_cache/ + rm -rf docs/_build/* + +setup: + -poetry env remove + poetry install + +format: + poetry run ruff format . + +lint: + poetry run check . + +build: + poetry build + +tests: + poetry run pytest -s -m "not slow and not manual" + +tests-manual: + poetry run pytest -s -m "manual" + +tests-slow: + poetry run pytest -s -m "slow and not manual" + +tests-all: + poetry run pytest + +docs: + $(MAKE) -C docs html diff --git a/script/README.md b/script/README.md deleted file mode 100644 index 5ba0916..0000000 --- a/script/README.md +++ /dev/null @@ -1,75 +0,0 @@ -# Scripts to Rule Them All - -## Script Summary - -| Script | Intent | -|:--|:--| -| [`script/installdeps`](#scriptinstalldeps) | Install project dependencies | -| [`script/clean`](#scriptclean) | Clean-up project artifacts | -| [`script/setup`](#scriptsetup) | Setup or reset the project to an initial state | -| [`script/update`](#scriptupdate) | Update the project after a fresh pull | -| [`script/test`](#scripttest) | Run the project's test suite | -| [`script/build`](#scriptbuild) | Build the project's product(s) | -| [`script/ci`](#scriptci) | Continuous integration script | -| [`script/ci-bootstrap`](#scriptcibootstrap) | CI bootstrap script | -| [`script/server`](#scriptserver) | Control project servers and services | -| [`script/console`](#scriptconsole) | Access the project's console | - -### script/installdeps - -[`script/installdeps`][installdeps] Install the dependencies for this project. - -### script/clean - -[`script/clean`][clean] Clean the project directory - -This script implements a `--deep` command line option that "deep cleans" the system removing all artifacts created by the project (virtual environments and all). - -### script/setup - -[`script/setup`][setup] Set up the project or reset it to an initial state. - -This is typically run after an initial clone, or, to _reset_ the project back to its _initial state_. [`script/clean`][clean] and [`script/installdeps`][installdeps] are run inside this script. - -### script/update - -[`script/update`][update] Update the project's dependencies. - -### script/test - -[`script/test`][test] Run the test suite for this project. - -This script implements `lint`, `tests`, and `ratelimiting` command line options to enable you to select and run only the code linting or the package tests (by default, both are run when you execute `script/test` without any command line arguments). - - -### script/build - -[`script/build`][build] Build this project's product(s). - -### script/ci - -[`script/ci`][ci] Continuous integration script. - -### script/ci-bootstrap - -[`script/ci-bootstrap`][ci-bootstrap] Prepare the CI environment. - -### script/console - -[`script/console`][console] Open a console for the project. - -## Inspiration - -The GitHub Engineering Team: [Scripts to Rule Them All](https://githubengineering.com/scripts-to-rule-them-all/) - -[github/scripts-to-rule-them-all](https://github.com/github/scripts-to-rule-them-all) - -[installdeps]: installdeps -[clean]: clean -[setup]: setup -[update]: update -[test]: test -[build]: build -[ci]: ci -[ci-bootstrap]: ci-bootstrap -[console]: console diff --git a/script/build b/script/build deleted file mode 100755 index 215b89d..0000000 --- a/script/build +++ /dev/null @@ -1,52 +0,0 @@ -#!/usr/bin/env bash -# Build the project's product(s). -# -# Copyright (c) 2016-2024 Cisco and/or its affiliates. -# License: MIT - - -set -e -cd "$(dirname "$0")/.." - - -# Default build -all=true - - -# Process Script Arguments -for i in ${@}; do - case ${i} in - package) - all= - package=true - ;; - - docs) - all= - docs=true - ;; - - *) - echo "Unknown argument: $i" - exit 1 - ;; - esac -done - - -echo "==> Cleaning previous build artifacts" -script/clean - - -# Project build steps -if [ ${all} ] || [ ${package} ]; then - echo "==> Building the Source Distribution package" - python setup.py sdist -fi - - -if [ ${all} ] || [ ${docs} ]; then - echo "==> Building the Docs" - make -C docs clean - make -C docs html SPHINXOPTS="-W" -fi diff --git a/script/ci b/script/ci deleted file mode 100755 index f3f1366..0000000 --- a/script/ci +++ /dev/null @@ -1,23 +0,0 @@ -#!/usr/bin/env bash -# Run the project's test suite. -# -# Copyright (c) 2016-2024 Cisco and/or its affiliates. -# License: MIT - - -set -e -cd "$(dirname "$0")/.." - - -# Build the package -script/build package - - -# Install the package -for file in dist/*.tar.gz; do - pip install ${file} -done - - -# Run the test suite -script/test tests diff --git a/script/clean b/script/clean deleted file mode 100755 index 523c0f5..0000000 --- a/script/clean +++ /dev/null @@ -1,70 +0,0 @@ -#!/usr/bin/env bash -# Clean the project directory. -# -# Copyright (c) 2016-2024 Cisco and/or its affiliates. -# License: MIT - - -set -e -cd "$(dirname "$0")/.." - - -# Process Script Arguments -for i in ${@}; do - case ${i} in - --deep) - deep_clean=true - ;; - - *) - echo "Unknown argument: $i" - exit 1 - ;; - esac -done - - -echo "==> Cleaning the project directory" - -echo "Removing Python build artifacts" -find . -name '*.pyc' -exec rm -f {} + -find . -name '*.pyo' -exec rm -f {} + -find . -name '*~' -exec rm -f {} + -find . -name '__pycache__' -exec rm -fr {} + -find . -name '*.egg-info' -exec rm -fr {} + -find . -name '*.egg' -exec rm -f {} + -rm -rf build/ -rm -rf dist/ -rm -rf .eggs/ - -echo "Removing test and coverage artifacts" -rm -rf .cache/ -rm -f .coverage -rm -rf .tox/ -rm -rf htmlcov/ -rm -rf .pytest_cache/ - -if [ -d "docs" ]; then - echo "Cleaning the docs directories" - rm -rf docs/_build/* -fi - - -if [ ${deep_clean} ]; then - echo "==> Deep cleaning..." - - if [ -f "Pipfile" ] && [ -n "$(pipenv --version 2>/dev/null)" ]; then - echo "Removing pipenv environment" - pipenv --rm || true - fi - - if [ -d ".venv" ]; then - echo "Removing project virtual environment: .venv" - rm -rf .venv/ - fi - - if [ -d "venv" ]; then - echo "Removing project virtual environment: 'venv'" - rm -rf venv/ - fi -fi diff --git a/script/console b/script/console deleted file mode 100755 index 6679b30..0000000 --- a/script/console +++ /dev/null @@ -1,13 +0,0 @@ -#!/usr/bin/env bash -# Open the project's console. -# -# Copyright (c) 2016-2024 Cisco and/or its affiliates. -# License: MIT - - -set -e -cd "$(dirname "$0")/.." - - -# Launch the project's console -ipython -i script/ipython_console.py diff --git a/script/installdeps b/script/installdeps deleted file mode 100755 index 968d077..0000000 --- a/script/installdeps +++ /dev/null @@ -1,41 +0,0 @@ -#!/usr/bin/env bash -# Install all the development dependencies for this project. -# -# Copyright (c) 2016-2024 Cisco and/or its affiliates. -# License: MIT - - -set -e -cd "$(dirname "$0")/.." - - -# Ensure that packages are only installed in an active virtual environment -export PIP_REQUIRE_VIRTUALENV=true - - -# Prefer use of a Pipfile and pipenv for dependency management -if [[ -f "Pipfile" ]] && [[ -n "$(pipenv --version 2>/dev/null)" ]]; then - echo "==> Installing Pipfile dependencies" - pipenv install --dev --skip-lock - -elif [[ -f "requirements.txt" ]]; then - echo "==> Installing requirements.txt dependencies" - - # Check for an active virtual environment, or look for one in the project directory - if [[ -n "$(python -c 'import sys; print (sys.real_prefix)' 2>/dev/null)" ]]; then - echo "Installing packages in the active virtual environment" - elif [[ -f "venv/bin/activate" ]]; then - echo "Installing packages in the project's venv virtual environment" - source venv/bin/activate - elif [[ -f ".venv/bin/activate" ]]; then - echo "Installing packages in the project's .venv virtual environment" - source .venv/bin/activate - else - echo >2& "VIRTUAL ENVIRONMENT ERROR: This project will only install packages into a Python virtual environment. Please activate your virtual environment and rerun the script." - exit 1 - fi - - pip install -r requirements.txt - pip install -e . - -fi \ No newline at end of file diff --git a/script/ipython_console.py b/script/ipython_console.py deleted file mode 100755 index 7939407..0000000 --- a/script/ipython_console.py +++ /dev/null @@ -1,14 +0,0 @@ -"""IPython Project Console. - -Used to interactively work with the main package contents in IPython. -""" - - - -import webexpythonsdk - -__copyright__ = "Copyright (c) 2016-2024 Cisco and/or its affiliates." -__license__ = "MIT" - - -api = webexpythonsdk.WebexAPI() diff --git a/script/setup b/script/setup deleted file mode 100755 index 37b4a95..0000000 --- a/script/setup +++ /dev/null @@ -1,15 +0,0 @@ -#!/usr/bin/env bash -# Setup or reset the project to its initial state. -# -# Copyright (c) 2016-2024 Cisco and/or its affiliates. -# License: MIT - - -set -e -cd "$(dirname "$0")/.." - - -echo "==> Setting up / resetting project for initial use" - -script/clean --deep -script/installdeps diff --git a/script/test b/script/test deleted file mode 100755 index fe9f6a7..0000000 --- a/script/test +++ /dev/null @@ -1,69 +0,0 @@ -#!/usr/bin/env bash -# Run the project's test suite(s). -# -# Copyright (c) 2016-2024 Cisco and/or its affiliates. -# License: MIT - - -# Run all tests by default -default=true - - -# Process Script Arguments -for i in "${@}"; do - case ${i} in - lint) - lint=true - default= - ;; - - tests) - tests=true - default= - ;; - - slow) - slow=true - default= - ;; - - manual) - slow=true - default= - ;; - - *) - echo "Unknown argument: $i" - exit 1 - ;; - esac -done - - -set -e -cd "$(dirname "$0")/.." - - -# Lint the source code -if [ ${default} ] || [ ${lint} ]; then - echo "==> Linting the source code" - flake8 -fi - -# Run the test suite -if [ ${default} ] || [ ${tests} ]; then - echo "==> Running the test suite (excluding slow and manual tests)" - pytest -s -m "not slow and not manual" -fi - -# Run the slow tests -if [ ${slow} ]; then - echo "==> Running the slow tests" - pytest -s -m "slow" -fi - -# Run the slow tests -if [ ${manual} ]; then - echo "==> Running the manual tests" - pytest -s -m "manual" -fi diff --git a/script/update b/script/update deleted file mode 100755 index 2c69c53..0000000 --- a/script/update +++ /dev/null @@ -1,23 +0,0 @@ -#!/usr/bin/env bash -# Update the project's dependencies. -# -# Copyright (c) 2016-2024 Cisco and/or its affiliates. -# License: MIT - - -set -e -cd "$(dirname "$0")/.." - - -echo "==> Updating project dependencies" - -echo "Update installed packages" -pipenv update --dev - -echo "Freeze package requirements" -pipenv run pip freeze > requirements.lock - -echo "Update versioneer script(s)" -rm versioneer.py -pipenv run versioneer install -echo "Done." From 704632aa3c4621d19ed370f20c7bdc45989f6073 Mon Sep 17 00:00:00 2001 From: Chris Lunsford Date: Thu, 20 Jun 2024 19:55:15 -0400 Subject: [PATCH 09/22] fix: Remove deprecated ruff `ignore-init-module-imports` --- pyproject.toml | 1 - 1 file changed, 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 1f80e4e..a86cb34 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -74,7 +74,6 @@ extend-exclude = [ # B: flake8-bugbear # Q: flake8-quotes extend-select = [ "B", "Q", "W" ] -ignore-init-module-imports = true ignore = [ # E402 module level import not at top of file "E402", From efc358f9bfb06b6c00e58c8471465ee6b8706f18 Mon Sep 17 00:00:00 2001 From: Chris Lunsford Date: Thu, 20 Jun 2024 19:56:27 -0400 Subject: [PATCH 10/22] fix: Docs build --- docs/user/api_structure_table.rst | 128 +++++++++++++++--------------- docs/user/intro.rst | 2 +- 2 files changed, 65 insertions(+), 65 deletions(-) diff --git a/docs/user/api_structure_table.rst b/docs/user/api_structure_table.rst index 2c2ec6e..23084a5 100644 --- a/docs/user/api_structure_table.rst +++ b/docs/user/api_structure_table.rst @@ -1,66 +1,66 @@ +------------------------+---------------------------+---------------------------------------------------------------------------------+ -| :class:`WebexAPI` | :ref:`access_tokens` | :meth:`get() ` | -| | | :meth:`refresh() ` | -+------------------------+---------------------------+---------------------------------------------------------------------------------+ -| | :ref:`admin_audit_events` | :meth:`list() ` | -+------------------------+---------------------------+---------------------------------------------------------------------------------+ -| | :ref:`attachment_actions` | :meth:`create() ` | -| | | :meth:`get() ` | -+------------------------+---------------------------+---------------------------------------------------------------------------------+ -| | :ref:`events` | :meth:`list() ` | -| | | :meth:`get() ` | -+------------------------+---------------------------+---------------------------------------------------------------------------------+ -| | :ref:`guest_issuer` | :meth:`create() ` | -+------------------------+---------------------------+---------------------------------------------------------------------------------+ -| | :ref:`licenses` | :meth:`list() ` | -| | | :meth:`create() ` | -+------------------------+---------------------------+---------------------------------------------------------------------------------+ -| | :ref:`memberships` | :meth:`list() ` | -| | | :meth:`create() ` | -| | | :meth:`get() ` | -| | | :meth:`update() ` | -| | | :meth:`delete() ` | -+------------------------+---------------------------+---------------------------------------------------------------------------------+ -| | :ref:`messages` | :meth:`list() ` | -| | | :meth:`list_direct() ` | -| | | :meth:`create() ` | -| | | :meth:`get() ` | -| | | :meth:`delete() ` | -+------------------------+---------------------------+---------------------------------------------------------------------------------+ -| | :ref:`organizations` | :meth:`list() ` | -| | | :meth:`create() ` | -+------------------------+---------------------------+---------------------------------------------------------------------------------+ -| | :ref:`people` | :meth:`list() ` | -| | | :meth:`create() ` | -| | | :meth:`get() ` | -| | | :meth:`update() ` | -| | | :meth:`me() ` | -+------------------------+---------------------------+---------------------------------------------------------------------------------+ -| | :ref:`roles` | :meth:`list() ` | -| | | :meth:`create() ` | -+------------------------+---------------------------+---------------------------------------------------------------------------------+ -| | :ref:`rooms` | :meth:`list() ` | -| | | :meth:`create() ` | -| | | :meth:`get() ` | -| | | :meth:`get_meeting_info() ` | -| | | :meth:`update() ` | -| | | :meth:`delete() ` | -+------------------------+---------------------------+---------------------------------------------------------------------------------+ -| | :ref:`team_memberships` | :meth:`list() ` | -| | | :meth:`create() ` | -| | | :meth:`get() ` | -| | | :meth:`update() ` | -| | | :meth:`delete() ` | -+------------------------+---------------------------+---------------------------------------------------------------------------------+ -| | :ref:`teams` | :meth:`list() ` | -| | | :meth:`create() ` | -| | | :meth:`get() ` | -| | | :meth:`update() ` | -| | | :meth:`delete() ` | -+------------------------+---------------------------+---------------------------------------------------------------------------------+ -| | :ref:`webhooks` | :meth:`list() ` | -| | | :meth:`create() ` | -| | | :meth:`get() ` | -| | | :meth:`update() ` | -| | | :meth:`delete() ` | +| :class:`WebexAPI` | :ref:`access_tokens` | :meth:`get() ` | +| | | :meth:`refresh() ` | ++------------------------+---------------------------+---------------------------------------------------------------------------------+ +| | :ref:`admin_audit_events` | :meth:`list() ` | ++------------------------+---------------------------+---------------------------------------------------------------------------------+ +| | :ref:`attachment_actions` | :meth:`create() ` | +| | | :meth:`get() ` | ++------------------------+---------------------------+---------------------------------------------------------------------------------+ +| | :ref:`events` | :meth:`list() ` | +| | | :meth:`get() ` | ++------------------------+---------------------------+---------------------------------------------------------------------------------+ +| | :ref:`guest_issuer` | :meth:`create() ` | ++------------------------+---------------------------+---------------------------------------------------------------------------------+ +| | :ref:`licenses` | :meth:`list() ` | +| | | :meth:`create() ` | ++------------------------+---------------------------+---------------------------------------------------------------------------------+ +| | :ref:`memberships` | :meth:`list() ` | +| | | :meth:`create() ` | +| | | :meth:`get() ` | +| | | :meth:`update() ` | +| | | :meth:`delete() ` | ++------------------------+---------------------------+---------------------------------------------------------------------------------+ +| | :ref:`messages` | :meth:`list() ` | +| | | :meth:`list_direct() ` | +| | | :meth:`create() ` | +| | | :meth:`get() ` | +| | | :meth:`delete() ` | ++------------------------+---------------------------+---------------------------------------------------------------------------------+ +| | :ref:`organizations` | :meth:`list() ` | +| | | :meth:`create() ` | ++------------------------+---------------------------+---------------------------------------------------------------------------------+ +| | :ref:`people` | :meth:`list() ` | +| | | :meth:`create() ` | +| | | :meth:`get() ` | +| | | :meth:`update() ` | +| | | :meth:`me() ` | ++------------------------+---------------------------+---------------------------------------------------------------------------------+ +| | :ref:`roles` | :meth:`list() ` | +| | | :meth:`create() ` | ++------------------------+---------------------------+---------------------------------------------------------------------------------+ +| | :ref:`rooms` | :meth:`list() ` | +| | | :meth:`create() ` | +| | | :meth:`get() ` | +| | | :meth:`get_meeting_info() ` | +| | | :meth:`update() ` | +| | | :meth:`delete() ` | ++------------------------+---------------------------+---------------------------------------------------------------------------------+ +| | :ref:`team_memberships` | :meth:`list() ` | +| | | :meth:`create() `| +| | | :meth:`get() ` | +| | | :meth:`update() `| +| | | :meth:`delete() `| ++------------------------+---------------------------+---------------------------------------------------------------------------------+ +| | :ref:`teams` | :meth:`list() ` | +| | | :meth:`create() ` | +| | | :meth:`get() ` | +| | | :meth:`update() ` | +| | | :meth:`delete() ` | ++------------------------+---------------------------+---------------------------------------------------------------------------------+ +| | :ref:`webhooks` | :meth:`list() ` | +| | | :meth:`create() ` | +| | | :meth:`get() ` | +| | | :meth:`update() ` | +| | | :meth:`delete() ` | +------------------------+---------------------------+---------------------------------------------------------------------------------+ diff --git a/docs/user/intro.rst b/docs/user/intro.rst index 684cd54..cd9a160 100644 --- a/docs/user/intro.rst +++ b/docs/user/intro.rst @@ -146,7 +146,7 @@ distributed as a source distribution (no binaries) via :ref:`PyPI `, and the complete :ref:`source code ` is available on GitHub. webexpythonsdk License ---------------------- +---------------------- .. include:: ../../LICENSE From e00e43ddda07be644c8e0c89423618c90d4a134d Mon Sep 17 00:00:00 2001 From: Chris Lunsford Date: Thu, 20 Jun 2024 19:57:02 -0400 Subject: [PATCH 11/22] fix: Rename test file --- tests/{test_webexteamssdk.py => test_webexpythonsdk.py} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename tests/{test_webexteamssdk.py => test_webexpythonsdk.py} (100%) diff --git a/tests/test_webexteamssdk.py b/tests/test_webexpythonsdk.py similarity index 100% rename from tests/test_webexteamssdk.py rename to tests/test_webexpythonsdk.py From 0e13e2e652c29ef7b73d7e984b0d32170b644c9b Mon Sep 17 00:00:00 2001 From: Chris Lunsford Date: Thu, 20 Jun 2024 19:58:49 -0400 Subject: [PATCH 12/22] format: Ruff --- docs/conf.py | 1 - examples/bot-example-flask.py | 2 -- examples/bot-example-webpy.py | 2 -- examples/local_file_upload.py | 1 - examples/ngrokwebhook.py | 2 -- examples/oauth-flask-ngrok.py | 1 - examples/people.py | 2 -- .../pyramidWebexTeamsBot/views.py | 2 -- src/webexpythonsdk/__init__.py | 1 - src/webexpythonsdk/api/__init__.py | 2 -- src/webexpythonsdk/api/access_tokens.py | 3 --- src/webexpythonsdk/api/admin_audit_events.py | 3 --- src/webexpythonsdk/api/attachment_actions.py | 3 --- src/webexpythonsdk/api/events.py | 3 --- src/webexpythonsdk/api/guest_issuer.py | 3 --- src/webexpythonsdk/api/licenses.py | 3 --- src/webexpythonsdk/api/meeting_invitees.py | 3 --- src/webexpythonsdk/api/meeting_registrants.py | 3 --- src/webexpythonsdk/api/meeting_templates.py | 3 --- src/webexpythonsdk/api/meetings.py | 3 --- src/webexpythonsdk/api/memberships.py | 3 --- src/webexpythonsdk/api/messages.py | 2 -- src/webexpythonsdk/api/organizations.py | 3 --- src/webexpythonsdk/api/people.py | 3 --- src/webexpythonsdk/api/recordings.py | 2 -- src/webexpythonsdk/api/roles.py | 3 --- src/webexpythonsdk/api/room_tabs.py | 3 --- src/webexpythonsdk/api/rooms.py | 3 --- src/webexpythonsdk/api/team_memberships.py | 3 --- src/webexpythonsdk/api/teams.py | 3 --- src/webexpythonsdk/api/webhooks.py | 3 --- src/webexpythonsdk/exceptions.py | 1 - src/webexpythonsdk/generator_containers.py | 1 - src/webexpythonsdk/models/dictionary.py | 1 - .../models/mixins/access_token.py | 2 -- .../models/mixins/admin_audit_event.py | 2 -- .../models/mixins/attachment_action.py | 2 -- src/webexpythonsdk/models/mixins/event.py | 2 -- .../models/mixins/guest_issuer_token.py | 2 -- src/webexpythonsdk/models/mixins/license.py | 2 -- .../models/mixins/meeting_invitees.py | 2 -- .../models/mixins/meeting_registrants.py | 2 -- .../models/mixins/meeting_templates.py | 2 -- src/webexpythonsdk/models/mixins/meetings.py | 2 -- .../models/mixins/membership.py | 2 -- src/webexpythonsdk/models/mixins/message.py | 2 -- .../models/mixins/organization.py | 2 -- src/webexpythonsdk/models/mixins/person.py | 2 -- src/webexpythonsdk/models/mixins/recording.py | 2 -- src/webexpythonsdk/models/mixins/role.py | 2 -- src/webexpythonsdk/models/mixins/room.py | 2 -- .../models/mixins/room_meeting_info.py | 2 -- src/webexpythonsdk/models/mixins/room_tab.py | 2 -- src/webexpythonsdk/models/mixins/team.py | 2 -- .../models/mixins/team_membership.py | 2 -- src/webexpythonsdk/models/mixins/webhook.py | 2 -- .../models/mixins/webhook_event.py | 2 -- src/webexpythonsdk/models/simple.py | 1 - src/webexpythonsdk/response_codes.py | 2 -- src/webexpythonsdk/restsession.py | 7 +----- src/webexpythonsdk/utils.py | 22 ++++++++----------- tests/api/test_guest_issuer.py | 4 +--- tests/api/test_meeting_registrants.py | 3 ++- 63 files changed, 13 insertions(+), 152 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index c938fb4..55381ea 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -1,4 +1,3 @@ - import os import sys diff --git a/examples/bot-example-flask.py b/examples/bot-example-flask.py index 3b617c5..ab59c27 100755 --- a/examples/bot-example-flask.py +++ b/examples/bot-example-flask.py @@ -43,8 +43,6 @@ SOFTWARE. """ - - __author__ = "Chris Lunsford" __author_email__ = "chrlunsf@cisco.com" __contributors__ = ["Brad Bester "] diff --git a/examples/bot-example-webpy.py b/examples/bot-example-webpy.py index e4a9cb4..0dddb7d 100755 --- a/examples/bot-example-webpy.py +++ b/examples/bot-example-webpy.py @@ -43,8 +43,6 @@ SOFTWARE. """ - - __author__ = "Brad Bester" __author_email__ = "brbester@cisco.com" __contributors__ = ["Chris Lunsford "] diff --git a/examples/local_file_upload.py b/examples/local_file_upload.py index 2e5a773..c9d9291 100755 --- a/examples/local_file_upload.py +++ b/examples/local_file_upload.py @@ -38,7 +38,6 @@ SOFTWARE. """ - import os from webexpythonsdk import WebexAPI diff --git a/examples/ngrokwebhook.py b/examples/ngrokwebhook.py index e411b98..8160706 100755 --- a/examples/ngrokwebhook.py +++ b/examples/ngrokwebhook.py @@ -34,8 +34,6 @@ SOFTWARE. """ - - __author__ = "Brad Bester" __author_email__ = "brbester@cisco.com" __contributors__ = ["Chris Lunsford "] diff --git a/examples/oauth-flask-ngrok.py b/examples/oauth-flask-ngrok.py index d47affb..b016a06 100644 --- a/examples/oauth-flask-ngrok.py +++ b/examples/oauth-flask-ngrok.py @@ -36,7 +36,6 @@ SOFTWARE. """ - from flask import Flask, url_for, session, redirect, request import urllib.parse from uuid import uuid4 diff --git a/examples/people.py b/examples/people.py index b88a88b..c8c2e39 100755 --- a/examples/people.py +++ b/examples/people.py @@ -27,8 +27,6 @@ SOFTWARE. """ - - __author__ = "Jose Bogarín Solano" __author_email__ = "jose@bogarin.co.cr" __contributors__ = ["Chris Lunsford "] diff --git a/examples/pyramidWebexTeamsBot/pyramidWebexTeamsBot/views.py b/examples/pyramidWebexTeamsBot/pyramidWebexTeamsBot/views.py index 9d8db5a..721e6e8 100755 --- a/examples/pyramidWebexTeamsBot/pyramidWebexTeamsBot/views.py +++ b/examples/pyramidWebexTeamsBot/pyramidWebexTeamsBot/views.py @@ -43,8 +43,6 @@ SOFTWARE. """ - - __author__ = "Jose Bogarín Solano" __author_email__ = "jose@bogarin.co.cr" __contributors__ = [ diff --git a/src/webexpythonsdk/__init__.py b/src/webexpythonsdk/__init__.py index 03eb040..43ae48a 100644 --- a/src/webexpythonsdk/__init__.py +++ b/src/webexpythonsdk/__init__.py @@ -21,7 +21,6 @@ SOFTWARE. """ - import logging import webexpythonsdk.models.cards as cards diff --git a/src/webexpythonsdk/api/__init__.py b/src/webexpythonsdk/api/__init__.py index 6842ffa..d1e9d40 100644 --- a/src/webexpythonsdk/api/__init__.py +++ b/src/webexpythonsdk/api/__init__.py @@ -21,8 +21,6 @@ SOFTWARE. """ -from past.types import str - from webexpythonsdk.config import ( DEFAULT_BASE_URL, DEFAULT_SINGLE_REQUEST_TIMEOUT, diff --git a/src/webexpythonsdk/api/access_tokens.py b/src/webexpythonsdk/api/access_tokens.py index 2d740f8..2f71811 100644 --- a/src/webexpythonsdk/api/access_tokens.py +++ b/src/webexpythonsdk/api/access_tokens.py @@ -21,9 +21,6 @@ SOFTWARE. """ - - - import urllib.parse import requests diff --git a/src/webexpythonsdk/api/admin_audit_events.py b/src/webexpythonsdk/api/admin_audit_events.py index 2302725..97c73fc 100644 --- a/src/webexpythonsdk/api/admin_audit_events.py +++ b/src/webexpythonsdk/api/admin_audit_events.py @@ -21,9 +21,6 @@ SOFTWARE. """ - - - from webexpythonsdk.generator_containers import generator_container from webexpythonsdk.restsession import RestSession from webexpythonsdk.utils import check_type, dict_from_items_with_values diff --git a/src/webexpythonsdk/api/attachment_actions.py b/src/webexpythonsdk/api/attachment_actions.py index b9d7307..887ba68 100644 --- a/src/webexpythonsdk/api/attachment_actions.py +++ b/src/webexpythonsdk/api/attachment_actions.py @@ -21,9 +21,6 @@ SOFTWARE. """ - - - from ..models.immutable import AttachmentAction from ..restsession import RestSession from ..utils import check_type, dict_from_items_with_values diff --git a/src/webexpythonsdk/api/events.py b/src/webexpythonsdk/api/events.py index 13762f6..2730d35 100644 --- a/src/webexpythonsdk/api/events.py +++ b/src/webexpythonsdk/api/events.py @@ -21,9 +21,6 @@ SOFTWARE. """ - - - from ..generator_containers import generator_container from ..restsession import RestSession from ..utils import ( diff --git a/src/webexpythonsdk/api/guest_issuer.py b/src/webexpythonsdk/api/guest_issuer.py index 3e39112..a01ab5f 100644 --- a/src/webexpythonsdk/api/guest_issuer.py +++ b/src/webexpythonsdk/api/guest_issuer.py @@ -21,9 +21,6 @@ SOFTWARE. """ - - - from ..generator_containers import generator_container from ..restsession import RestSession from ..utils import ( diff --git a/src/webexpythonsdk/api/licenses.py b/src/webexpythonsdk/api/licenses.py index 240a1c3..c5d73f2 100644 --- a/src/webexpythonsdk/api/licenses.py +++ b/src/webexpythonsdk/api/licenses.py @@ -21,9 +21,6 @@ SOFTWARE. """ - - - from ..generator_containers import generator_container from ..restsession import RestSession from ..utils import ( diff --git a/src/webexpythonsdk/api/meeting_invitees.py b/src/webexpythonsdk/api/meeting_invitees.py index 15d4a0e..5f4880d 100644 --- a/src/webexpythonsdk/api/meeting_invitees.py +++ b/src/webexpythonsdk/api/meeting_invitees.py @@ -21,9 +21,6 @@ SOFTWARE. """ - - - from ..generator_containers import generator_container from ..restsession import RestSession from ..utils import ( diff --git a/src/webexpythonsdk/api/meeting_registrants.py b/src/webexpythonsdk/api/meeting_registrants.py index a70ccb7..0c02c02 100644 --- a/src/webexpythonsdk/api/meeting_registrants.py +++ b/src/webexpythonsdk/api/meeting_registrants.py @@ -21,9 +21,6 @@ SOFTWARE. """ - - - from ..generator_containers import generator_container from ..restsession import RestSession from ..utils import ( diff --git a/src/webexpythonsdk/api/meeting_templates.py b/src/webexpythonsdk/api/meeting_templates.py index 94e5f50..4dc5f88 100644 --- a/src/webexpythonsdk/api/meeting_templates.py +++ b/src/webexpythonsdk/api/meeting_templates.py @@ -21,9 +21,6 @@ SOFTWARE. """ - - - from ..generator_containers import generator_container from ..restsession import RestSession from ..utils import ( diff --git a/src/webexpythonsdk/api/meetings.py b/src/webexpythonsdk/api/meetings.py index fa6f0eb..7cd72c4 100644 --- a/src/webexpythonsdk/api/meetings.py +++ b/src/webexpythonsdk/api/meetings.py @@ -21,9 +21,6 @@ SOFTWARE. """ - - - from ..generator_containers import generator_container from ..restsession import RestSession from ..utils import ( diff --git a/src/webexpythonsdk/api/memberships.py b/src/webexpythonsdk/api/memberships.py index 17c0a50..736b38a 100644 --- a/src/webexpythonsdk/api/memberships.py +++ b/src/webexpythonsdk/api/memberships.py @@ -21,9 +21,6 @@ SOFTWARE. """ - - - from ..generator_containers import generator_container from ..restsession import RestSession from ..utils import ( diff --git a/src/webexpythonsdk/api/messages.py b/src/webexpythonsdk/api/messages.py index 4f1448c..051b183 100644 --- a/src/webexpythonsdk/api/messages.py +++ b/src/webexpythonsdk/api/messages.py @@ -21,8 +21,6 @@ SOFTWARE. """ - - from requests_toolbelt import MultipartEncoder from webexpythonsdk.models.cards import AdaptiveCard diff --git a/src/webexpythonsdk/api/organizations.py b/src/webexpythonsdk/api/organizations.py index 7e8bd44..304570d 100644 --- a/src/webexpythonsdk/api/organizations.py +++ b/src/webexpythonsdk/api/organizations.py @@ -21,9 +21,6 @@ SOFTWARE. """ - - - from webexpythonsdk.generator_containers import generator_container from webexpythonsdk.restsession import RestSession from webexpythonsdk.utils import check_type, dict_from_items_with_values diff --git a/src/webexpythonsdk/api/people.py b/src/webexpythonsdk/api/people.py index d510518..e86d3a2 100644 --- a/src/webexpythonsdk/api/people.py +++ b/src/webexpythonsdk/api/people.py @@ -21,9 +21,6 @@ SOFTWARE. """ - - - from ..generator_containers import generator_container from ..restsession import RestSession from ..utils import ( diff --git a/src/webexpythonsdk/api/recordings.py b/src/webexpythonsdk/api/recordings.py index 4df83ad..497d238 100644 --- a/src/webexpythonsdk/api/recordings.py +++ b/src/webexpythonsdk/api/recordings.py @@ -21,8 +21,6 @@ SOFTWARE. """ - - from webexpythonsdk.generator_containers import generator_container from webexpythonsdk.utils import check_type, dict_from_items_with_values diff --git a/src/webexpythonsdk/api/roles.py b/src/webexpythonsdk/api/roles.py index 87675cf..996c2ae 100644 --- a/src/webexpythonsdk/api/roles.py +++ b/src/webexpythonsdk/api/roles.py @@ -21,9 +21,6 @@ SOFTWARE. """ - - - from ..generator_containers import generator_container from ..restsession import RestSession from ..utils import ( diff --git a/src/webexpythonsdk/api/room_tabs.py b/src/webexpythonsdk/api/room_tabs.py index d2cb06f..c6f6e28 100644 --- a/src/webexpythonsdk/api/room_tabs.py +++ b/src/webexpythonsdk/api/room_tabs.py @@ -21,9 +21,6 @@ SOFTWARE. """ - - - from ..generator_containers import generator_container from ..restsession import RestSession from ..utils import ( diff --git a/src/webexpythonsdk/api/rooms.py b/src/webexpythonsdk/api/rooms.py index f94dee0..3e3a9e5 100644 --- a/src/webexpythonsdk/api/rooms.py +++ b/src/webexpythonsdk/api/rooms.py @@ -21,9 +21,6 @@ SOFTWARE. """ - - - from ..generator_containers import generator_container from ..restsession import RestSession from ..utils import ( diff --git a/src/webexpythonsdk/api/team_memberships.py b/src/webexpythonsdk/api/team_memberships.py index 3416680..c4b265b 100644 --- a/src/webexpythonsdk/api/team_memberships.py +++ b/src/webexpythonsdk/api/team_memberships.py @@ -21,9 +21,6 @@ SOFTWARE. """ - - - from ..generator_containers import generator_container from ..restsession import RestSession from ..utils import ( diff --git a/src/webexpythonsdk/api/teams.py b/src/webexpythonsdk/api/teams.py index b6cba66..84472b8 100644 --- a/src/webexpythonsdk/api/teams.py +++ b/src/webexpythonsdk/api/teams.py @@ -21,9 +21,6 @@ SOFTWARE. """ - - - from ..generator_containers import generator_container from ..restsession import RestSession from ..utils import ( diff --git a/src/webexpythonsdk/api/webhooks.py b/src/webexpythonsdk/api/webhooks.py index ae63546..98e9dd5 100644 --- a/src/webexpythonsdk/api/webhooks.py +++ b/src/webexpythonsdk/api/webhooks.py @@ -21,9 +21,6 @@ SOFTWARE. """ - - - from ..generator_containers import generator_container from ..restsession import RestSession from ..utils import ( diff --git a/src/webexpythonsdk/exceptions.py b/src/webexpythonsdk/exceptions.py index 1737c6a..e0bd380 100644 --- a/src/webexpythonsdk/exceptions.py +++ b/src/webexpythonsdk/exceptions.py @@ -21,7 +21,6 @@ SOFTWARE. """ - import logging import requests diff --git a/src/webexpythonsdk/generator_containers.py b/src/webexpythonsdk/generator_containers.py index c040ebb..5cc6ba8 100644 --- a/src/webexpythonsdk/generator_containers.py +++ b/src/webexpythonsdk/generator_containers.py @@ -28,7 +28,6 @@ SOFTWARE. """ - import functools import inspect from itertools import islice diff --git a/src/webexpythonsdk/models/dictionary.py b/src/webexpythonsdk/models/dictionary.py index 7033af0..e3371e3 100644 --- a/src/webexpythonsdk/models/dictionary.py +++ b/src/webexpythonsdk/models/dictionary.py @@ -21,7 +21,6 @@ SOFTWARE. """ - from webexpythonsdk.utils import json_dict diff --git a/src/webexpythonsdk/models/mixins/access_token.py b/src/webexpythonsdk/models/mixins/access_token.py index 320f68d..d82023b 100644 --- a/src/webexpythonsdk/models/mixins/access_token.py +++ b/src/webexpythonsdk/models/mixins/access_token.py @@ -22,8 +22,6 @@ """ - - class AccessTokenBasicPropertiesMixin(object): """Access Token basic properties.""" diff --git a/src/webexpythonsdk/models/mixins/admin_audit_event.py b/src/webexpythonsdk/models/mixins/admin_audit_event.py index 5961e79..ff38b5e 100644 --- a/src/webexpythonsdk/models/mixins/admin_audit_event.py +++ b/src/webexpythonsdk/models/mixins/admin_audit_event.py @@ -21,8 +21,6 @@ SOFTWARE. """ - - from webexpythonsdk.utils import WebexDateTime diff --git a/src/webexpythonsdk/models/mixins/attachment_action.py b/src/webexpythonsdk/models/mixins/attachment_action.py index f769fa9..5343011 100644 --- a/src/webexpythonsdk/models/mixins/attachment_action.py +++ b/src/webexpythonsdk/models/mixins/attachment_action.py @@ -21,8 +21,6 @@ SOFTWARE. """ - - from webexpythonsdk.utils import WebexDateTime diff --git a/src/webexpythonsdk/models/mixins/event.py b/src/webexpythonsdk/models/mixins/event.py index 0c5743a..02123ca 100644 --- a/src/webexpythonsdk/models/mixins/event.py +++ b/src/webexpythonsdk/models/mixins/event.py @@ -21,8 +21,6 @@ SOFTWARE. """ - - from webexpythonsdk.utils import WebexDateTime diff --git a/src/webexpythonsdk/models/mixins/guest_issuer_token.py b/src/webexpythonsdk/models/mixins/guest_issuer_token.py index 4bc0059..e91364d 100644 --- a/src/webexpythonsdk/models/mixins/guest_issuer_token.py +++ b/src/webexpythonsdk/models/mixins/guest_issuer_token.py @@ -22,8 +22,6 @@ """ - - class GuestIssuerTokenBasicPropertiesMixin(object): """Guest issuer token basic properties""" diff --git a/src/webexpythonsdk/models/mixins/license.py b/src/webexpythonsdk/models/mixins/license.py index 31645b8..ca2c0a0 100644 --- a/src/webexpythonsdk/models/mixins/license.py +++ b/src/webexpythonsdk/models/mixins/license.py @@ -22,8 +22,6 @@ """ - - class LicenseBasicPropertiesMixin(object): """License basic properties.""" diff --git a/src/webexpythonsdk/models/mixins/meeting_invitees.py b/src/webexpythonsdk/models/mixins/meeting_invitees.py index 1a95164..d8f2603 100644 --- a/src/webexpythonsdk/models/mixins/meeting_invitees.py +++ b/src/webexpythonsdk/models/mixins/meeting_invitees.py @@ -22,8 +22,6 @@ """ - - class MeetingInviteeBasicPropertiesMixin(object): """MeetingInvitee basic properties.""" diff --git a/src/webexpythonsdk/models/mixins/meeting_registrants.py b/src/webexpythonsdk/models/mixins/meeting_registrants.py index b8cbd4a..12b06cf 100644 --- a/src/webexpythonsdk/models/mixins/meeting_registrants.py +++ b/src/webexpythonsdk/models/mixins/meeting_registrants.py @@ -22,8 +22,6 @@ """ - - class MeetingRegistrantBasicPropertiesMixin(object): """MeetingRegistrant basic properties.""" diff --git a/src/webexpythonsdk/models/mixins/meeting_templates.py b/src/webexpythonsdk/models/mixins/meeting_templates.py index 63bc94d..48620bc 100644 --- a/src/webexpythonsdk/models/mixins/meeting_templates.py +++ b/src/webexpythonsdk/models/mixins/meeting_templates.py @@ -22,8 +22,6 @@ """ - - class MeetingTemplateBasicPropertiesMixin(object): """MeetingTemplate basic properties.""" diff --git a/src/webexpythonsdk/models/mixins/meetings.py b/src/webexpythonsdk/models/mixins/meetings.py index 76f8035..8f6a6cc 100644 --- a/src/webexpythonsdk/models/mixins/meetings.py +++ b/src/webexpythonsdk/models/mixins/meetings.py @@ -22,8 +22,6 @@ """ - - class MeetingBasicPropertiesMixin(object): """Meeting basic properties.""" diff --git a/src/webexpythonsdk/models/mixins/membership.py b/src/webexpythonsdk/models/mixins/membership.py index f8756b4..9eab083 100644 --- a/src/webexpythonsdk/models/mixins/membership.py +++ b/src/webexpythonsdk/models/mixins/membership.py @@ -21,8 +21,6 @@ SOFTWARE. """ - - import warnings from webexpythonsdk.utils import WebexDateTime diff --git a/src/webexpythonsdk/models/mixins/message.py b/src/webexpythonsdk/models/mixins/message.py index a2dbf6b..6aa334c 100644 --- a/src/webexpythonsdk/models/mixins/message.py +++ b/src/webexpythonsdk/models/mixins/message.py @@ -21,8 +21,6 @@ SOFTWARE. """ - - from webexpythonsdk.utils import WebexDateTime diff --git a/src/webexpythonsdk/models/mixins/organization.py b/src/webexpythonsdk/models/mixins/organization.py index e4c27a3..4e8c188 100644 --- a/src/webexpythonsdk/models/mixins/organization.py +++ b/src/webexpythonsdk/models/mixins/organization.py @@ -21,8 +21,6 @@ SOFTWARE. """ - - from webexpythonsdk.utils import WebexDateTime diff --git a/src/webexpythonsdk/models/mixins/person.py b/src/webexpythonsdk/models/mixins/person.py index ff22eef..4084fc6 100644 --- a/src/webexpythonsdk/models/mixins/person.py +++ b/src/webexpythonsdk/models/mixins/person.py @@ -21,8 +21,6 @@ SOFTWARE. """ - - from webexpythonsdk.utils import WebexDateTime diff --git a/src/webexpythonsdk/models/mixins/recording.py b/src/webexpythonsdk/models/mixins/recording.py index 0932076..1ded29b 100644 --- a/src/webexpythonsdk/models/mixins/recording.py +++ b/src/webexpythonsdk/models/mixins/recording.py @@ -21,8 +21,6 @@ SOFTWARE. """ - - from webexpythonsdk.utils import WebexDateTime diff --git a/src/webexpythonsdk/models/mixins/role.py b/src/webexpythonsdk/models/mixins/role.py index ea909e8..48d74ae 100644 --- a/src/webexpythonsdk/models/mixins/role.py +++ b/src/webexpythonsdk/models/mixins/role.py @@ -22,8 +22,6 @@ """ - - class RoleBasicPropertiesMixin(object): """Role basic properties.""" diff --git a/src/webexpythonsdk/models/mixins/room.py b/src/webexpythonsdk/models/mixins/room.py index 9a7be37..b2d3b0f 100644 --- a/src/webexpythonsdk/models/mixins/room.py +++ b/src/webexpythonsdk/models/mixins/room.py @@ -21,8 +21,6 @@ SOFTWARE. """ - - from webexpythonsdk.utils import WebexDateTime diff --git a/src/webexpythonsdk/models/mixins/room_meeting_info.py b/src/webexpythonsdk/models/mixins/room_meeting_info.py index 34e1692..23043b8 100644 --- a/src/webexpythonsdk/models/mixins/room_meeting_info.py +++ b/src/webexpythonsdk/models/mixins/room_meeting_info.py @@ -22,8 +22,6 @@ """ - - class RoomMeetingInfoBasicPropertiesMixin(object): """Room basic properties.""" diff --git a/src/webexpythonsdk/models/mixins/room_tab.py b/src/webexpythonsdk/models/mixins/room_tab.py index 7a3a542..08bc905 100644 --- a/src/webexpythonsdk/models/mixins/room_tab.py +++ b/src/webexpythonsdk/models/mixins/room_tab.py @@ -21,8 +21,6 @@ SOFTWARE. """ - - from webexpythonsdk.utils import WebexDateTime diff --git a/src/webexpythonsdk/models/mixins/team.py b/src/webexpythonsdk/models/mixins/team.py index ef75bf4..0a59331 100644 --- a/src/webexpythonsdk/models/mixins/team.py +++ b/src/webexpythonsdk/models/mixins/team.py @@ -21,8 +21,6 @@ SOFTWARE. """ - - from webexpythonsdk.utils import WebexDateTime diff --git a/src/webexpythonsdk/models/mixins/team_membership.py b/src/webexpythonsdk/models/mixins/team_membership.py index f520e6d..be5f133 100644 --- a/src/webexpythonsdk/models/mixins/team_membership.py +++ b/src/webexpythonsdk/models/mixins/team_membership.py @@ -21,8 +21,6 @@ SOFTWARE. """ - - from webexpythonsdk.utils import WebexDateTime diff --git a/src/webexpythonsdk/models/mixins/webhook.py b/src/webexpythonsdk/models/mixins/webhook.py index 3cb9019..53fd5df 100644 --- a/src/webexpythonsdk/models/mixins/webhook.py +++ b/src/webexpythonsdk/models/mixins/webhook.py @@ -21,8 +21,6 @@ SOFTWARE. """ - - from webexpythonsdk.utils import WebexDateTime diff --git a/src/webexpythonsdk/models/mixins/webhook_event.py b/src/webexpythonsdk/models/mixins/webhook_event.py index 043cd8f..261540b 100644 --- a/src/webexpythonsdk/models/mixins/webhook_event.py +++ b/src/webexpythonsdk/models/mixins/webhook_event.py @@ -22,8 +22,6 @@ """ - - class WebhookEventBasicPropertiesMixin(object): """Webhook Event basic properties.""" diff --git a/src/webexpythonsdk/models/simple.py b/src/webexpythonsdk/models/simple.py index b79b8a7..2b360bb 100644 --- a/src/webexpythonsdk/models/simple.py +++ b/src/webexpythonsdk/models/simple.py @@ -28,7 +28,6 @@ SOFTWARE. """ - import json from webexpythonsdk.utils import json_dict diff --git a/src/webexpythonsdk/response_codes.py b/src/webexpythonsdk/response_codes.py index bebdbaa..f42570e 100644 --- a/src/webexpythonsdk/response_codes.py +++ b/src/webexpythonsdk/response_codes.py @@ -21,8 +21,6 @@ SOFTWARE. """ - - RESPONSE_CODES = { 200: "Successful request with body content.", 204: "Successful request without body content.", diff --git a/src/webexpythonsdk/restsession.py b/src/webexpythonsdk/restsession.py index 3dfe238..af4d006 100644 --- a/src/webexpythonsdk/restsession.py +++ b/src/webexpythonsdk/restsession.py @@ -21,10 +21,6 @@ SOFTWARE. """ - - - - import json import logging import platform @@ -87,8 +83,7 @@ def _fix_next_url(next_url, params): if "max=null" in query_list: query_list.remove("max=null") warnings.warn( - "`max=null` still present in next-URL returned " - "from Webex", + "`max=null` still present in next-URL returned " "from Webex", RuntimeWarning, stacklevel=1, ) diff --git a/src/webexpythonsdk/utils.py b/src/webexpythonsdk/utils.py index 7bb8737..30016de 100644 --- a/src/webexpythonsdk/utils.py +++ b/src/webexpythonsdk/utils.py @@ -21,8 +21,6 @@ SOFTWARE. """ - - native_str = str import json @@ -64,18 +62,16 @@ def to_unicode(string): def to_bytes(string): - """Convert a string (bytes, str or unicode) to bytes.""" - assert isinstance(string, str) - if sys.version_info[0] >= 3: - if isinstance(string, str): - return string.encode("utf-8") - else: - return string + """Convert a string (bytes, str) to bytes.""" + if isinstance(string, str): + return string.encode("utf-8") + elif isinstance(string, bytes): + return string else: - if isinstance(string, unicode): - return string.encode("utf-8") - else: - return string + raise TypeError( + "'string' must be a string or bytes object; " + "received: {!r}".format(string) + ) def validate_base_url(base_url): diff --git a/tests/api/test_guest_issuer.py b/tests/api/test_guest_issuer.py index fa90228..b6c7c19 100644 --- a/tests/api/test_guest_issuer.py +++ b/tests/api/test_guest_issuer.py @@ -30,9 +30,7 @@ TOKEN_EXPIRATION_SECONDS = 60 * 5 WEBEX_GUEST_ISSUER_ID = os.environ.get("WEBEX_GUEST_ISSUER_ID") -WEBEX_GUEST_ISSUER_SECRET = os.environ.get( - "WEBEX_GUEST_ISSUER_SECRET" -) +WEBEX_GUEST_ISSUER_SECRET = os.environ.get("WEBEX_GUEST_ISSUER_SECRET") if WEBEX_GUEST_ISSUER_ID is None or not WEBEX_GUEST_ISSUER_SECRET: pytest.skip( diff --git a/tests/api/test_meeting_registrants.py b/tests/api/test_meeting_registrants.py index 4ab40dd..7d9ed1f 100644 --- a/tests/api/test_meeting_registrants.py +++ b/tests/api/test_meeting_registrants.py @@ -33,7 +33,8 @@ def is_valid_registrant(obj): return ( - isinstance(obj, webexpythonsdk.MeetingRegistrant) and obj.id is not None + isinstance(obj, webexpythonsdk.MeetingRegistrant) + and obj.id is not None ) From 05533c15afc89f360c41001cc8afaa8eb2d7aa79 Mon Sep 17 00:00:00 2001 From: Chris Lunsford Date: Thu, 20 Jun 2024 20:05:34 -0400 Subject: [PATCH 13/22] fix: Makefile --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 57c69c1..6ba4e88 100644 --- a/Makefile +++ b/Makefile @@ -13,14 +13,14 @@ clean: rm -rf docs/_build/* setup: - -poetry env remove + -poetry env remove --all poetry install format: poetry run ruff format . lint: - poetry run check . + poetry run ruff check . build: poetry build From 3dedd845f7c2dfe9e4ceb075be08c910ad101c96 Mon Sep 17 00:00:00 2001 From: Chris Lunsford Date: Sun, 23 Jun 2024 22:32:15 -0400 Subject: [PATCH 14/22] Add 'update' Makefile target --- Makefile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 6ba4e88..e571aa5 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -.PHONY: clean setup format lint build tests tests-manual tests-slow tests-all docs +.PHONY: clean setup update format lint build tests tests-manual tests-slow tests-all docs clean: find . -name '*.pyc' -exec rm -f {} + @@ -16,6 +16,9 @@ setup: -poetry env remove --all poetry install +update: + poetry update + format: poetry run ruff format . From 1073f2f997429c230fa97fb70b760ea4164dd270 Mon Sep 17 00:00:00 2001 From: Chris Lunsford Date: Sun, 23 Jun 2024 22:33:50 -0400 Subject: [PATCH 15/22] Replace versioneer with poetry-dynamic-versioning Update dependencies. --- poetry.lock | 52 ++- pyproject.toml | 20 +- src/webexpythonsdk/_metadata.py | 10 +- src/webexpythonsdk/_version.py | 566 -------------------------------- 4 files changed, 29 insertions(+), 619 deletions(-) delete mode 100644 src/webexpythonsdk/_version.py diff --git a/poetry.lock b/poetry.lock index 0ad8b6c..3dc8af6 100644 --- a/poetry.lock +++ b/poetry.lock @@ -648,28 +648,28 @@ requests = ">=2.0.1,<3.0.0" [[package]] name = "ruff" -version = "0.4.9" +version = "0.4.10" description = "An extremely fast Python linter and code formatter, written in Rust." optional = false python-versions = ">=3.7" files = [ - {file = "ruff-0.4.9-py3-none-macosx_10_12_x86_64.whl", hash = "sha256:b262ed08d036ebe162123170b35703aaf9daffecb698cd367a8d585157732991"}, - {file = "ruff-0.4.9-py3-none-macosx_11_0_arm64.whl", hash = "sha256:98ec2775fd2d856dc405635e5ee4ff177920f2141b8e2d9eb5bd6efd50e80317"}, - {file = "ruff-0.4.9-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:4555056049d46d8a381f746680db1c46e67ac3b00d714606304077682832998e"}, - {file = "ruff-0.4.9-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:e91175fbe48f8a2174c9aad70438fe9cb0a5732c4159b2a10a3565fea2d94cde"}, - {file = "ruff-0.4.9-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:0e8e7b95673f22e0efd3571fb5b0cf71a5eaaa3cc8a776584f3b2cc878e46bff"}, - {file = "ruff-0.4.9-py3-none-manylinux_2_17_ppc64.manylinux2014_ppc64.whl", hash = "sha256:2d45ddc6d82e1190ea737341326ecbc9a61447ba331b0a8962869fcada758505"}, - {file = "ruff-0.4.9-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:78de3fdb95c4af084087628132336772b1c5044f6e710739d440fc0bccf4d321"}, - {file = "ruff-0.4.9-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:06b60f91bfa5514bb689b500a25ba48e897d18fea14dce14b48a0c40d1635893"}, - {file = "ruff-0.4.9-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:88bffe9c6a454bf8529f9ab9091c99490578a593cc9f9822b7fc065ee0712a06"}, - {file = "ruff-0.4.9-py3-none-musllinux_1_2_aarch64.whl", hash = "sha256:673bddb893f21ab47a8334c8e0ea7fd6598ecc8e698da75bcd12a7b9d0a3206e"}, - {file = "ruff-0.4.9-py3-none-musllinux_1_2_armv7l.whl", hash = "sha256:8c1aff58c31948cc66d0b22951aa19edb5af0a3af40c936340cd32a8b1ab7438"}, - {file = "ruff-0.4.9-py3-none-musllinux_1_2_i686.whl", hash = "sha256:784d3ec9bd6493c3b720a0b76f741e6c2d7d44f6b2be87f5eef1ae8cc1d54c84"}, - {file = "ruff-0.4.9-py3-none-musllinux_1_2_x86_64.whl", hash = "sha256:732dd550bfa5d85af8c3c6cbc47ba5b67c6aed8a89e2f011b908fc88f87649db"}, - {file = "ruff-0.4.9-py3-none-win32.whl", hash = "sha256:8064590fd1a50dcf4909c268b0e7c2498253273309ad3d97e4a752bb9df4f521"}, - {file = "ruff-0.4.9-py3-none-win_amd64.whl", hash = "sha256:e0a22c4157e53d006530c902107c7f550b9233e9706313ab57b892d7197d8e52"}, - {file = "ruff-0.4.9-py3-none-win_arm64.whl", hash = "sha256:5d5460f789ccf4efd43f265a58538a2c24dbce15dbf560676e430375f20a8198"}, - {file = "ruff-0.4.9.tar.gz", hash = "sha256:f1cb0828ac9533ba0135d148d214e284711ede33640465e706772645483427e3"}, + {file = "ruff-0.4.10-py3-none-macosx_10_12_x86_64.whl", hash = "sha256:5c2c4d0859305ac5a16310eec40e4e9a9dec5dcdfbe92697acd99624e8638dac"}, + {file = "ruff-0.4.10-py3-none-macosx_11_0_arm64.whl", hash = "sha256:a79489607d1495685cdd911a323a35871abfb7a95d4f98fc6f85e799227ac46e"}, + {file = "ruff-0.4.10-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:b1dd1681dfa90a41b8376a61af05cc4dc5ff32c8f14f5fe20dba9ff5deb80cd6"}, + {file = "ruff-0.4.10-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:c75c53bb79d71310dc79fb69eb4902fba804a81f374bc86a9b117a8d077a1784"}, + {file = "ruff-0.4.10-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:18238c80ee3d9100d3535d8eb15a59c4a0753b45cc55f8bf38f38d6a597b9739"}, + {file = "ruff-0.4.10-py3-none-manylinux_2_17_ppc64.manylinux2014_ppc64.whl", hash = "sha256:d8f71885bce242da344989cae08e263de29752f094233f932d4f5cfb4ef36a81"}, + {file = "ruff-0.4.10-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:330421543bd3222cdfec481e8ff3460e8702ed1e58b494cf9d9e4bf90db52b9d"}, + {file = "ruff-0.4.10-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:9e9b6fb3a37b772628415b00c4fc892f97954275394ed611056a4b8a2631365e"}, + {file = "ruff-0.4.10-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:0f54c481b39a762d48f64d97351048e842861c6662d63ec599f67d515cb417f6"}, + {file = "ruff-0.4.10-py3-none-musllinux_1_2_aarch64.whl", hash = "sha256:67fe086b433b965c22de0b4259ddfe6fa541c95bf418499bedb9ad5fb8d1c631"}, + {file = "ruff-0.4.10-py3-none-musllinux_1_2_armv7l.whl", hash = "sha256:acfaaab59543382085f9eb51f8e87bac26bf96b164839955f244d07125a982ef"}, + {file = "ruff-0.4.10-py3-none-musllinux_1_2_i686.whl", hash = "sha256:3cea07079962b2941244191569cf3a05541477286f5cafea638cd3aa94b56815"}, + {file = "ruff-0.4.10-py3-none-musllinux_1_2_x86_64.whl", hash = "sha256:338a64ef0748f8c3a80d7f05785930f7965d71ca260904a9321d13be24b79695"}, + {file = "ruff-0.4.10-py3-none-win32.whl", hash = "sha256:ffe3cd2f89cb54561c62e5fa20e8f182c0a444934bf430515a4b422f1ab7b7ca"}, + {file = "ruff-0.4.10-py3-none-win_amd64.whl", hash = "sha256:67f67cef43c55ffc8cc59e8e0b97e9e60b4837c8f21e8ab5ffd5d66e196e25f7"}, + {file = "ruff-0.4.10-py3-none-win_arm64.whl", hash = "sha256:dd1fcee327c20addac7916ca4e2653fbbf2e8388d8a6477ce5b4e986b68ae6c0"}, + {file = "ruff-0.4.10.tar.gz", hash = "sha256:3aa4f2bc388a30d346c56524f7cacca85945ba124945fe489952aadb6b5cd804"}, ] [[package]] @@ -929,20 +929,6 @@ h2 = ["h2 (>=4,<5)"] socks = ["pysocks (>=1.5.6,!=1.5.7,<2.0)"] zstd = ["zstandard (>=0.18.0)"] -[[package]] -name = "versioneer" -version = "0.29" -description = "Easy VCS-based management of project version strings" -optional = false -python-versions = ">=3.7" -files = [ - {file = "versioneer-0.29-py3-none-any.whl", hash = "sha256:0f1a137bb5d6811e96a79bb0486798aeae9b9c6efc24b389659cebb0ee396cb9"}, - {file = "versioneer-0.29.tar.gz", hash = "sha256:5ab283b9857211d61b53318b7c792cf68e798e765ee17c27ade9f6c924235731"}, -] - -[package.extras] -toml = ["tomli"] - [[package]] name = "wcwidth" version = "0.2.13" @@ -957,4 +943,4 @@ files = [ [metadata] lock-version = "2.0" python-versions = "^3.10" -content-hash = "d54a2bd575343d14409d52aeae6e6b2d69bf73a73ce7d530c49be288ab2efff7" +content-hash = "2b80dba4c804238828eabbb024ee9557e967d2ae1abb8cfaa9196c4690ea0886" diff --git a/pyproject.toml b/pyproject.toml index a86cb34..53420c2 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -36,7 +36,6 @@ requests-toolbelt = "^1.0.0" PyJWT = "^2.8.0" [tool.poetry.group.dev.dependencies] -versioneer = "^0.29" PyYAML = "^6.0.1" ruff = "^0.4.9" pytest = "^8.2.2" @@ -47,16 +46,17 @@ sphinx = "^7.3.7" sphinx-rtd-theme = "^2.0.0" [build-system] -requires = ["poetry-core", "versioneer[toml]"] +requires = ["poetry-core>=1.2.0", "poetry-dynamic-versioning>=1.0.0,<2.0.0"] build-backend = "poetry.core.masonry.api" -[tool.versioneer] -VCS = "git" -style = "pep440-post" -versionfile_source = "src/webexpythonsdk/_version.py" -versionfile_build = "webexpythonsdk/_version.py" -tag_prefix = "v" -parentdir_prefix = "webexpythonsdk-" +[tool.poetry-dynamic-versioning] +enable = true +vcs = "git" +style = "pep440" + +[tool.poetry-dynamic-versioning.substitution] +files = ["src/webexpythonsdk/_metadata.py"] + [tool.pytest.ini_options] addopts = "--strict-markers" @@ -65,8 +65,6 @@ markers = ["slow", "manual"] [tool.ruff] line-length = 79 extend-exclude = [ - "versioneer.py", - "src/webexpythonsdk/_version.py", "generator/**", ] diff --git a/src/webexpythonsdk/_metadata.py b/src/webexpythonsdk/_metadata.py index ce75609..c402106 100644 --- a/src/webexpythonsdk/_metadata.py +++ b/src/webexpythonsdk/_metadata.py @@ -22,6 +22,7 @@ """ __title__ = "webexpythonsdk" +__version__ = "0.0.0" # This will be overwritten by the build process __description__ = "Community-developed Python SDK for the Webex APIs" __url__ = "https://github.com/WebexCommunity/WebexPythonSDK" __download_url__ = "https://pypi.python.org/pypi/webexpythonsdk" @@ -29,12 +30,3 @@ __author_email__ = "chrlunsf@cisco.com" __copyright__ = "Copyright (c) 2016-2024 Cisco and/or its affiliates." __license__ = "MIT" - - -# Only import the ._version module and compute the version when this module is -# imported. -if __name__ == "webexpythonsdk._metadata": - from ._version import get_versions - - __version__ = get_versions()["version"] - del get_versions diff --git a/src/webexpythonsdk/_version.py b/src/webexpythonsdk/_version.py deleted file mode 100644 index 7b3dcba..0000000 --- a/src/webexpythonsdk/_version.py +++ /dev/null @@ -1,566 +0,0 @@ -# This file helps to compute a version number in source trees obtained from -# git-archive tarball (such as those provided by githubs download-from-tag -# feature). Distribution tarballs (built by setup.py sdist) and build -# directories (produced by setup.py build) will contain a much shorter file -# that just contains the computed version number. - -# This file is released into the public domain. Generated by -# versioneer-0.18 (https://github.com/warner/python-versioneer) - -"""Git implementation of _version.py.""" - -import errno -import os -import re -import subprocess -import sys - - -def get_keywords(): - """Get the keywords needed to look up the version information.""" - # these strings will be replaced by git during git-archive. - # setup.py/versioneer.py will grep for the variable names, so they must - # each be defined on a line of their own. _version.py will just call - # get_keywords(). - git_refnames = "$Format:%d$" - git_full = "$Format:%H$" - git_date = "$Format:%ci$" - keywords = {"refnames": git_refnames, "full": git_full, "date": git_date} - return keywords - - -class VersioneerConfig: - """Container for Versioneer configuration parameters.""" - - -def get_config(): - """Create, populate and return the VersioneerConfig() object.""" - # these strings are filled in when 'setup.py versioneer' creates - # _version.py - cfg = VersioneerConfig() - cfg.VCS = "git" - cfg.style = "pep440-post" - cfg.tag_prefix = "v" - cfg.parentdir_prefix = "None" - cfg.versionfile_source = "webexpythonsdk/_version.py" - cfg.verbose = False - return cfg - - -class NotThisMethod(Exception): - """Exception raised if a method is not valid for the current scenario.""" - - -LONG_VERSION_PY = {} -HANDLERS = {} - - -def register_vcs_handler(vcs, method): # decorator - """Decorator to mark a method as the handler for a particular VCS.""" - - def decorate(f): - """Store f in HANDLERS[vcs][method].""" - if vcs not in HANDLERS: - HANDLERS[vcs] = {} - HANDLERS[vcs][method] = f - return f - - return decorate - - -def run_command( - commands, args, cwd=None, verbose=False, hide_stderr=False, env=None -): - """Call the given command(s).""" - assert isinstance(commands, list) - p = None - for c in commands: - try: - dispcmd = str([c] + args) - # remember shell=False, so use git.cmd on windows, not just git - p = subprocess.Popen( - [c] + args, - cwd=cwd, - env=env, - stdout=subprocess.PIPE, - stderr=(subprocess.PIPE if hide_stderr else None), - ) - break - except EnvironmentError: - e = sys.exc_info()[1] - if e.errno == errno.ENOENT: - continue - if verbose: - print("unable to run %s" % dispcmd) - print(e) - return None, None - else: - if verbose: - print("unable to find command, tried %s" % (commands,)) - return None, None - stdout = p.communicate()[0].strip() - if sys.version_info[0] >= 3: - stdout = stdout.decode() - if p.returncode != 0: - if verbose: - print("unable to run %s (error)" % dispcmd) - print("stdout was %s" % stdout) - return None, p.returncode - return stdout, p.returncode - - -def versions_from_parentdir(parentdir_prefix, root, verbose): - """Try to determine the version from the parent directory name. - - Source tarballs conventionally unpack into a directory that includes both - the project name and a version string. We will also support searching up - two directory levels for an appropriately named parent directory - """ - rootdirs = [] - - for i in range(3): - dirname = os.path.basename(root) - if dirname.startswith(parentdir_prefix): - return { - "version": dirname[len(parentdir_prefix) :], - "full-revisionid": None, - "dirty": False, - "error": None, - "date": None, - } - else: - rootdirs.append(root) - root = os.path.dirname(root) # up a level - - if verbose: - print( - "Tried directories %s but none started with prefix %s" - % (str(rootdirs), parentdir_prefix) - ) - raise NotThisMethod("rootdir doesn't start with parentdir_prefix") - - -@register_vcs_handler("git", "get_keywords") -def git_get_keywords(versionfile_abs): - """Extract version information from the given file.""" - # the code embedded in _version.py can just fetch the value of these - # keywords. When used from setup.py, we don't want to import _version.py, - # so we do it with a regexp instead. This function is not used from - # _version.py. - keywords = {} - try: - f = open(versionfile_abs, "r") - for line in f.readlines(): - if line.strip().startswith("git_refnames ="): - mo = re.search(r'=\s*"(.*)"', line) - if mo: - keywords["refnames"] = mo.group(1) - if line.strip().startswith("git_full ="): - mo = re.search(r'=\s*"(.*)"', line) - if mo: - keywords["full"] = mo.group(1) - if line.strip().startswith("git_date ="): - mo = re.search(r'=\s*"(.*)"', line) - if mo: - keywords["date"] = mo.group(1) - f.close() - except EnvironmentError: - pass - return keywords - - -@register_vcs_handler("git", "keywords") -def git_versions_from_keywords(keywords, tag_prefix, verbose): - """Get version information from git keywords.""" - if not keywords: - raise NotThisMethod("no keywords at all, weird") - date = keywords.get("date") - if date is not None: - # git-2.2.0 added "%cI", which expands to an ISO-8601 -compliant - # datestamp. However we prefer "%ci" (which expands to an "ISO-8601 - # -like" string, which we must then edit to make compliant), because - # it's been around since git-1.5.3, and it's too difficult to - # discover which version we're using, or to work around using an - # older one. - date = date.strip().replace(" ", "T", 1).replace(" ", "", 1) - refnames = keywords["refnames"].strip() - if refnames.startswith("$Format"): - if verbose: - print("keywords are unexpanded, not using") - raise NotThisMethod("unexpanded keywords, not a git-archive tarball") - refs = set([r.strip() for r in refnames.strip("()").split(",")]) - # starting in git-1.8.3, tags are listed as "tag: foo-1.0" instead of - # just "foo-1.0". If we see a "tag: " prefix, prefer those. - TAG = "tag: " - tags = set([r[len(TAG) :] for r in refs if r.startswith(TAG)]) - if not tags: - # Either we're using git < 1.8.3, or there really are no tags. We use - # a heuristic: assume all version tags have a digit. The old git %d - # expansion behaves like git log --decorate=short and strips out the - # refs/heads/ and refs/tags/ prefixes that would let us distinguish - # between branches and tags. By ignoring refnames without digits, we - # filter out many common branch names like "release" and - # "stabilization", as well as "HEAD" and "master". - tags = set([r for r in refs if re.search(r"\d", r)]) - if verbose: - print("discarding '%s', no digits" % ",".join(refs - tags)) - if verbose: - print("likely tags: %s" % ",".join(sorted(tags))) - for ref in sorted(tags): - # sorting will prefer e.g. "2.0" over "2.0rc1" - if ref.startswith(tag_prefix): - r = ref[len(tag_prefix) :] - if verbose: - print("picking %s" % r) - return { - "version": r, - "full-revisionid": keywords["full"].strip(), - "dirty": False, - "error": None, - "date": date, - } - # no suitable tags, so version is "0+unknown", but full hex is still there - if verbose: - print("no suitable tags, using unknown + full revision id") - return { - "version": "0+unknown", - "full-revisionid": keywords["full"].strip(), - "dirty": False, - "error": "no suitable tags", - "date": None, - } - - -@register_vcs_handler("git", "pieces_from_vcs") -def git_pieces_from_vcs(tag_prefix, root, verbose, run_command=run_command): - """Get version from 'git describe' in the root of the source tree. - - This only gets called if the git-archive 'subst' keywords were *not* - expanded, and _version.py hasn't already been rewritten with a short - version string, meaning we're inside a checked out source tree. - """ - GITS = ["git"] - if sys.platform == "win32": - GITS = ["git.cmd", "git.exe"] - - out, rc = run_command( - GITS, ["rev-parse", "--git-dir"], cwd=root, hide_stderr=True - ) - if rc != 0: - if verbose: - print("Directory %s not under git control" % root) - raise NotThisMethod("'git rev-parse --git-dir' returned error") - - # if there is a tag matching tag_prefix, this yields TAG-NUM-gHEX[-dirty] - # if there isn't one, this yields HEX[-dirty] (no NUM) - describe_out, rc = run_command( - GITS, - [ - "describe", - "--tags", - "--dirty", - "--always", - "--long", - "--match", - "%s*" % tag_prefix, - ], - cwd=root, - ) - # --long was added in git-1.5.5 - if describe_out is None: - raise NotThisMethod("'git describe' failed") - describe_out = describe_out.strip() - full_out, rc = run_command(GITS, ["rev-parse", "HEAD"], cwd=root) - if full_out is None: - raise NotThisMethod("'git rev-parse' failed") - full_out = full_out.strip() - - pieces = {} - pieces["long"] = full_out - pieces["short"] = full_out[:7] # maybe improved later - pieces["error"] = None - - # parse describe_out. It will be like TAG-NUM-gHEX[-dirty] or HEX[-dirty] - # TAG might have hyphens. - git_describe = describe_out - - # look for -dirty suffix - dirty = git_describe.endswith("-dirty") - pieces["dirty"] = dirty - if dirty: - git_describe = git_describe[: git_describe.rindex("-dirty")] - - # now we have TAG-NUM-gHEX or HEX - - if "-" in git_describe: - # TAG-NUM-gHEX - mo = re.search(r"^(.+)-(\d+)-g([0-9a-f]+)$", git_describe) - if not mo: - # unparseable. Maybe git-describe is misbehaving? - pieces["error"] = ( - "unable to parse git-describe output: '%s'" % describe_out - ) - return pieces - - # tag - full_tag = mo.group(1) - if not full_tag.startswith(tag_prefix): - if verbose: - fmt = "tag '%s' doesn't start with prefix '%s'" - print(fmt % (full_tag, tag_prefix)) - pieces["error"] = "tag '%s' doesn't start with prefix '%s'" % ( - full_tag, - tag_prefix, - ) - return pieces - pieces["closest-tag"] = full_tag[len(tag_prefix) :] - - # distance: number of commits since tag - pieces["distance"] = int(mo.group(2)) - - # commit: short hex revision ID - pieces["short"] = mo.group(3) - - else: - # HEX: no tags - pieces["closest-tag"] = None - count_out, rc = run_command( - GITS, ["rev-list", "HEAD", "--count"], cwd=root - ) - pieces["distance"] = int(count_out) # total number of commits - - # commit date: see ISO-8601 comment in git_versions_from_keywords() - date = run_command(GITS, ["show", "-s", "--format=%ci", "HEAD"], cwd=root)[ - 0 - ].strip() - pieces["date"] = date.strip().replace(" ", "T", 1).replace(" ", "", 1) - - return pieces - - -def plus_or_dot(pieces): - """Return a + if we don't already have one, else return a .""" - if "+" in pieces.get("closest-tag", ""): - return "." - return "+" - - -def render_pep440(pieces): - """Build up version string, with post-release "local version identifier". - - Our goal: TAG[+DISTANCE.gHEX[.dirty]] . Note that if you - get a tagged build and then dirty it, you'll get TAG+0.gHEX.dirty - - Exceptions: - 1: no tags. git_describe was just HEX. 0+untagged.DISTANCE.gHEX[.dirty] - """ - if pieces["closest-tag"]: - rendered = pieces["closest-tag"] - if pieces["distance"] or pieces["dirty"]: - rendered += plus_or_dot(pieces) - rendered += "%d.g%s" % (pieces["distance"], pieces["short"]) - if pieces["dirty"]: - rendered += ".dirty" - else: - # exception #1 - rendered = "0+untagged.%d.g%s" % (pieces["distance"], pieces["short"]) - if pieces["dirty"]: - rendered += ".dirty" - return rendered - - -def render_pep440_pre(pieces): - """TAG[.post.devDISTANCE] -- No -dirty. - - Exceptions: - 1: no tags. 0.post.devDISTANCE - """ - if pieces["closest-tag"]: - rendered = pieces["closest-tag"] - if pieces["distance"]: - rendered += ".post.dev%d" % pieces["distance"] - else: - # exception #1 - rendered = "0.post.dev%d" % pieces["distance"] - return rendered - - -def render_pep440_post(pieces): - """TAG[.postDISTANCE[.dev0]+gHEX] . - - The ".dev0" means dirty. Note that .dev0 sorts backwards - (a dirty tree will appear "older" than the corresponding clean one), - but you shouldn't be releasing software with -dirty anyways. - - Exceptions: - 1: no tags. 0.postDISTANCE[.dev0] - """ - if pieces["closest-tag"]: - rendered = pieces["closest-tag"] - if pieces["distance"] or pieces["dirty"]: - rendered += ".post%d" % pieces["distance"] - if pieces["dirty"]: - rendered += ".dev0" - rendered += plus_or_dot(pieces) - rendered += "g%s" % pieces["short"] - else: - # exception #1 - rendered = "0.post%d" % pieces["distance"] - if pieces["dirty"]: - rendered += ".dev0" - rendered += "+g%s" % pieces["short"] - return rendered - - -def render_pep440_old(pieces): - """TAG[.postDISTANCE[.dev0]] . - - The ".dev0" means dirty. - - Eexceptions: - 1: no tags. 0.postDISTANCE[.dev0] - """ - if pieces["closest-tag"]: - rendered = pieces["closest-tag"] - if pieces["distance"] or pieces["dirty"]: - rendered += ".post%d" % pieces["distance"] - if pieces["dirty"]: - rendered += ".dev0" - else: - # exception #1 - rendered = "0.post%d" % pieces["distance"] - if pieces["dirty"]: - rendered += ".dev0" - return rendered - - -def render_git_describe(pieces): - """TAG[-DISTANCE-gHEX][-dirty]. - - Like 'git describe --tags --dirty --always'. - - Exceptions: - 1: no tags. HEX[-dirty] (note: no 'g' prefix) - """ - if pieces["closest-tag"]: - rendered = pieces["closest-tag"] - if pieces["distance"]: - rendered += "-%d-g%s" % (pieces["distance"], pieces["short"]) - else: - # exception #1 - rendered = pieces["short"] - if pieces["dirty"]: - rendered += "-dirty" - return rendered - - -def render_git_describe_long(pieces): - """TAG-DISTANCE-gHEX[-dirty]. - - Like 'git describe --tags --dirty --always -long'. - The distance/hash is unconditional. - - Exceptions: - 1: no tags. HEX[-dirty] (note: no 'g' prefix) - """ - if pieces["closest-tag"]: - rendered = pieces["closest-tag"] - rendered += "-%d-g%s" % (pieces["distance"], pieces["short"]) - else: - # exception #1 - rendered = pieces["short"] - if pieces["dirty"]: - rendered += "-dirty" - return rendered - - -def render(pieces, style): - """Render the given version pieces into the requested style.""" - if pieces["error"]: - return { - "version": "unknown", - "full-revisionid": pieces.get("long"), - "dirty": None, - "error": pieces["error"], - "date": None, - } - - if not style or style == "default": - style = "pep440" # the default - - if style == "pep440": - rendered = render_pep440(pieces) - elif style == "pep440-pre": - rendered = render_pep440_pre(pieces) - elif style == "pep440-post": - rendered = render_pep440_post(pieces) - elif style == "pep440-old": - rendered = render_pep440_old(pieces) - elif style == "git-describe": - rendered = render_git_describe(pieces) - elif style == "git-describe-long": - rendered = render_git_describe_long(pieces) - else: - raise ValueError("unknown style '%s'" % style) - - return { - "version": rendered, - "full-revisionid": pieces["long"], - "dirty": pieces["dirty"], - "error": None, - "date": pieces.get("date"), - } - - -def get_versions(): - """Get version information or return default if unable to do so.""" - # I am in _version.py, which lives at ROOT/VERSIONFILE_SOURCE. If we have - # __file__, we can work backwards from there to the root. Some - # py2exe/bbfreeze/non-CPython implementations don't do __file__, in which - # case we can only use expanded keywords. - - cfg = get_config() - verbose = cfg.verbose - - try: - return git_versions_from_keywords( - get_keywords(), cfg.tag_prefix, verbose - ) - except NotThisMethod: - pass - - try: - root = os.path.realpath(__file__) - # versionfile_source is the relative path from the top of the source - # tree (where the .git directory might live) to this file. Invert - # this to find the root from __file__. - for i in cfg.versionfile_source.split("/"): - root = os.path.dirname(root) - except NameError: - return { - "version": "0+unknown", - "full-revisionid": None, - "dirty": None, - "error": "unable to find root of source tree", - "date": None, - } - - try: - pieces = git_pieces_from_vcs(cfg.tag_prefix, root, verbose) - return render(pieces, cfg.style) - except NotThisMethod: - pass - - try: - if cfg.parentdir_prefix: - return versions_from_parentdir(cfg.parentdir_prefix, root, verbose) - except NotThisMethod: - pass - - return { - "version": "0+unknown", - "full-revisionid": None, - "dirty": None, - "error": "unable to compute version", - "date": None, - } From 88c2b7db1f32190d0973cef175e56e4faf012f4c Mon Sep 17 00:00:00 2001 From: Chris Lunsford Date: Sun, 23 Jun 2024 22:50:28 -0400 Subject: [PATCH 16/22] Organize pyproject.toml --- pyproject.toml | 62 +++++++++++++++++++++++++++++++++++++++++--------- 1 file changed, 51 insertions(+), 11 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 53420c2..c097332 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,10 @@ +# ------------------------------------------------------------------------------------------------- +# Webex Python SDK Package Configuration +# ------------------------------------------------------------------------------------------------- + [tool.poetry] name = "webexpythonsdk" -version = "0.0.0" +version = "0.0.0" # This will be overwritten by the build process description = "Work with the Webex APIs in native Python!" authors = ["Chris Lunsford "] license = "MIT" @@ -29,38 +33,52 @@ classifiers = [ "Topic :: Software Development :: Libraries :: Python Modules", ] + +# -------------------------------------------------------------------------------------- +# Package Dependencies +# -------------------------------------------------------------------------------------- + [tool.poetry.dependencies] python = "^3.10" requests = "^2.32.3" requests-toolbelt = "^1.0.0" PyJWT = "^2.8.0" + +# -------------------------------------------------------------------------------------- +# Development Dependencies +# -------------------------------------------------------------------------------------- + [tool.poetry.group.dev.dependencies] PyYAML = "^6.0.1" ruff = "^0.4.9" pytest = "^8.2.2" ipython = "^8.25.0" +# -------------------------------------------------------------------------------------- +# Documentation Dependencies +# -------------------------------------------------------------------------------------- + [tool.poetry.group.docs.dependencies] sphinx = "^7.3.7" sphinx-rtd-theme = "^2.0.0" +# -------------------------------------------------------------------------------------- +# Build System +# -------------------------------------------------------------------------------------- + [build-system] requires = ["poetry-core>=1.2.0", "poetry-dynamic-versioning>=1.0.0,<2.0.0"] build-backend = "poetry.core.masonry.api" -[tool.poetry-dynamic-versioning] -enable = true -vcs = "git" -style = "pep440" - -[tool.poetry-dynamic-versioning.substitution] -files = ["src/webexpythonsdk/_metadata.py"] +# ------------------------------------------------------------------------------------------------- +# Tool Configurations +# ------------------------------------------------------------------------------------------------- -[tool.pytest.ini_options] -addopts = "--strict-markers" -markers = ["slow", "manual"] +# -------------------------------------------------------------------------------------- +# Ruff +# -------------------------------------------------------------------------------------- [tool.ruff] line-length = 79 @@ -82,3 +100,25 @@ ignore = [ # F405 'unicode' may be undefined, or defined from star imports: builtins "F405", ] + + +# -------------------------------------------------------------------------------------- +# Pytest +# -------------------------------------------------------------------------------------- + +[tool.pytest.ini_options] +addopts = "--strict-markers" +markers = ["slow", "manual"] + + +# -------------------------------------------------------------------------------------- +# Poetry Dynamic Versioning +# -------------------------------------------------------------------------------------- + +[tool.poetry-dynamic-versioning] +enable = true +vcs = "git" +style = "pep440" + +[tool.poetry-dynamic-versioning.substitution] +files = ["src/webexpythonsdk/_metadata.py"] From 6a4567297d96786a102d05a23a2451188641a009 Mon Sep 17 00:00:00 2001 From: Chris Lunsford Date: Sun, 23 Jun 2024 22:57:25 -0400 Subject: [PATCH 17/22] Correct email addresses --- docs/code_of_conduct.rst | 2 +- docs/user/quickstart.rst | 10 +++++----- examples/bot-example-flask.py | 2 +- examples/bot-example-webpy.py | 2 +- examples/bot-with-card-example-flask.py | 2 +- examples/local_file_upload.py | 2 +- examples/ngrokwebhook.py | 2 +- examples/people.py | 2 +- .../pyramidWebexTeamsBot/__init__.py | 2 +- .../pyramidWebexTeamsBot/pyramidWebexTeamsBot/views.py | 2 +- examples/pyramidWebexTeamsBot/setup.py | 2 +- src/webexpythonsdk/_metadata.py | 2 +- 12 files changed, 16 insertions(+), 16 deletions(-) diff --git a/docs/code_of_conduct.rst b/docs/code_of_conduct.rst index beff9ed..cb37b10 100644 --- a/docs/code_of_conduct.rst +++ b/docs/code_of_conduct.rst @@ -43,7 +43,7 @@ This Code of Conduct applies both within project spaces and in public spaces whe Enforcement =========== -Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at chrlunsf@cisco.com. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately. +Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at jozanini@cisco.com. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately. Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership. diff --git a/docs/user/quickstart.rst b/docs/user/quickstart.rst index 0cbbc42..f66dc13 100644 --- a/docs/user/quickstart.rst +++ b/docs/user/quickstart.rst @@ -169,7 +169,7 @@ ready to start making API calls. .. code-block:: python >>> api.people.me() - Person({"displayName": "Chris Lunsford", "firstName": "Chris", "created": "2012-06-15T20:36:48.914Z", "lastName": "Lunsford", "emails": ["chrlunsf@cisco.com"], "avatar": "https://1efa7a94ed216783e352-c62266528714497a17239ececf39e9e2.ssl.cf1.rackcdn.com/V1~ba1ecf557a7e0b7cc3081998df965aad~7-HrvYOJSQ6eJgWJuFVbzg==~1600", "id": "Y2lzY29zcGFyazovL3VzL1BFT1BMRS9mZjhlZTZmYi1hZmVmLTRhNGQtOTJiMS1kNmIyMTZiNTg5NDk"}) + Person({"displayName": "Chris Lunsford", "firstName": "Chris", "created": "2012-06-15T20:36:48.914Z", "lastName": "Lunsford", "emails": ["cm@lunsford.io"], "avatar": "https://1efa7a94ed216783e352-c62266528714497a17239ececf39e9e2.ssl.cf1.rackcdn.com/V1~ba1ecf557a7e0b7cc3081998df965aad~7-HrvYOJSQ6eJgWJuFVbzg==~1600", "id": "Y2lzY29zcGFyazovL3VzL1BFT1BMRS9mZjhlZTZmYi1hZmVmLTRhNGQtOTJiMS1kNmIyMTZiNTg5NDk"}) It really is that easy. @@ -200,7 +200,7 @@ You can easily access and call any of these methods directly from your >>> chris_id = "Y2lzY29zcGFyazovL3VzL1BFT1BMRS9mZjhlZTZmYi1hZmVmLTRhNGQtOTJiMS1kNmIyMTZiNTg5NDk" >>> api.people.get(personId=chris_id) - Person({"displayName": "Chris Lunsford", "firstName": "Chris", "created": "2012-06-15T20:36:48.914Z", "lastName": "Lunsford", "emails": ["chrlunsf@cisco.com"], "avatar": "https://1efa7a94ed216783e352-c62266528714497a17239ececf39e9e2.ssl.cf1.rackcdn.com/V1~ba1ecf557a7e0b7cc3081998df965aad~7-HrvYOJSQ6eJgWJuFVbzg==~1600", "id": "Y2lzY29zcGFyazovL3VzL1BFT1BMRS9mZjhlZTZmYi1hZmVmLTRhNGQtOTJiMS1kNmIyMTZiNTg5NDk"}) + Person({"displayName": "Chris Lunsford", "firstName": "Chris", "created": "2012-06-15T20:36:48.914Z", "lastName": "Lunsford", "emails": ["cm@lunsford.io"], "avatar": "https://1efa7a94ed216783e352-c62266528714497a17239ececf39e9e2.ssl.cf1.rackcdn.com/V1~ba1ecf557a7e0b7cc3081998df965aad~7-HrvYOJSQ6eJgWJuFVbzg==~1600", "id": "Y2lzY29zcGFyazovL3VzL1BFT1BMRS9mZjhlZTZmYi1hZmVmLTRhNGQtOTJiMS1kNmIyMTZiNTg5NDk"}) Catching Exceptions @@ -270,7 +270,7 @@ The Webex cloud returns data objects in JSON format, like so: "created": "2012-06-15T20:36:48.914Z", "lastName": "Lunsford", "emails": [ - "chrlunsf@cisco.com" + "cm@lunsford.io" ], "avatar": "https://1efa7a94ed216783e352-c62266528714497a17239ececf39e9e2.ssl.cf1.rackcdn.com/V1~ba1ecf557a7e0b7cc3081998df965aad~7-HrvYOJSQ6eJgWJuFVbzg==~1600", "id": "Y2lzY29zcGFyazovL3VzL1BFT1BMRS9mZjhlZTZmYi1hZmVmLTRhNGQtOTJiMS1kNmIyMTZiNTg5NDk" @@ -299,11 +299,11 @@ help clean up your code and make coding easier: >>> # Do this >>> api.people.get(personId=me.id) - Person({"displayName": "Chris Lunsford", "firstName": "Chris", "created": "2012-06-15T20:36:48.914Z", "lastName": "Lunsford", "emails": ["chrlunsf@cisco.com"], "avatar": "https://1efa7a94ed216783e352-c62266528714497a17239ececf39e9e2.ssl.cf1.rackcdn.com/V1~ba1ecf557a7e0b7cc3081998df965aad~7-HrvYOJSQ6eJgWJuFVbzg==~1600", "id": "Y2lzY29zcGFyazovL3VzL1BFT1BMRS9mZjhlZTZmYi1hZmVmLTRhNGQtOTJiMS1kNmIyMTZiNTg5NDk"}) + Person({"displayName": "Chris Lunsford", "firstName": "Chris", "created": "2012-06-15T20:36:48.914Z", "lastName": "Lunsford", "emails": ["cm@lunsford.io"], "avatar": "https://1efa7a94ed216783e352-c62266528714497a17239ececf39e9e2.ssl.cf1.rackcdn.com/V1~ba1ecf557a7e0b7cc3081998df965aad~7-HrvYOJSQ6eJgWJuFVbzg==~1600", "id": "Y2lzY29zcGFyazovL3VzL1BFT1BMRS9mZjhlZTZmYi1hZmVmLTRhNGQtOTJiMS1kNmIyMTZiNTg5NDk"}) >>> # Instead of this >>> my_id = me.id >>> api.people.get(personId=my_id) - Person({"displayName": "Chris Lunsford", "firstName": "Chris", "created": "2012-06-15T20:36:48.914Z", "lastName": "Lunsford", "emails": ["chrlunsf@cisco.com"], "avatar": "https://1efa7a94ed216783e352-c62266528714497a17239ececf39e9e2.ssl.cf1.rackcdn.com/V1~ba1ecf557a7e0b7cc3081998df965aad~7-HrvYOJSQ6eJgWJuFVbzg==~1600", "id": "Y2lzY29zcGFyazovL3VzL1BFT1BMRS9mZjhlZTZmYi1hZmVmLTRhNGQtOTJiMS1kNmIyMTZiNTg5NDk"}) + Person({"displayName": "Chris Lunsford", "firstName": "Chris", "created": "2012-06-15T20:36:48.914Z", "lastName": "Lunsford", "emails": ["cm@lunsford.io"], "avatar": "https://1efa7a94ed216783e352-c62266528714497a17239ececf39e9e2.ssl.cf1.rackcdn.com/V1~ba1ecf557a7e0b7cc3081998df965aad~7-HrvYOJSQ6eJgWJuFVbzg==~1600", "id": "Y2lzY29zcGFyazovL3VzL1BFT1BMRS9mZjhlZTZmYi1hZmVmLTRhNGQtOTJiMS1kNmIyMTZiNTg5NDk"}) 2. If your IDE supports auto-completion (like PyCharm_ for example), then you can easily see and 'tab-out' available attributes while coding. diff --git a/examples/bot-example-flask.py b/examples/bot-example-flask.py index ab59c27..252ae64 100755 --- a/examples/bot-example-flask.py +++ b/examples/bot-example-flask.py @@ -44,7 +44,7 @@ """ __author__ = "Chris Lunsford" -__author_email__ = "chrlunsf@cisco.com" +__author_email__ = "cm@lunsford.io" __contributors__ = ["Brad Bester "] __copyright__ = "Copyright (c) 2016-2024 Cisco and/or its affiliates." __license__ = "MIT" diff --git a/examples/bot-example-webpy.py b/examples/bot-example-webpy.py index 0dddb7d..d55a249 100755 --- a/examples/bot-example-webpy.py +++ b/examples/bot-example-webpy.py @@ -45,7 +45,7 @@ __author__ = "Brad Bester" __author_email__ = "brbester@cisco.com" -__contributors__ = ["Chris Lunsford "] +__contributors__ = ["Chris Lunsford "] __copyright__ = "Copyright (c) 2016-2024 Cisco and/or its affiliates." __license__ = "MIT" diff --git a/examples/bot-with-card-example-flask.py b/examples/bot-with-card-example-flask.py index 82f6238..7ecc034 100755 --- a/examples/bot-with-card-example-flask.py +++ b/examples/bot-with-card-example-flask.py @@ -64,7 +64,7 @@ # Script metadata __author__ = "JP Shipherd" __author_email__ = "jshipher@cisco.com" -__contributors__ = ["Chris Lunsford "] +__contributors__ = ["Chris Lunsford "] __copyright__ = "Copyright (c) 2016-2024 Cisco and/or its affiliates." __license__ = "MIT" diff --git a/examples/local_file_upload.py b/examples/local_file_upload.py index c9d9291..09c3449 100755 --- a/examples/local_file_upload.py +++ b/examples/local_file_upload.py @@ -45,7 +45,7 @@ __author__ = "Jeff Levensailor" __author_email__ = "jeff@levensailor.com" -__contributors__ = ["Chris Lunsford "] +__contributors__ = ["Chris Lunsford "] __copyright__ = "Copyright (c) 2016-2024 Cisco and/or its affiliates." __license__ = "MIT" diff --git a/examples/ngrokwebhook.py b/examples/ngrokwebhook.py index 8160706..77a9d5a 100755 --- a/examples/ngrokwebhook.py +++ b/examples/ngrokwebhook.py @@ -36,7 +36,7 @@ __author__ = "Brad Bester" __author_email__ = "brbester@cisco.com" -__contributors__ = ["Chris Lunsford "] +__contributors__ = ["Chris Lunsford "] __copyright__ = "Copyright (c) 2016-2024 Cisco and/or its affiliates." __license__ = "MIT" diff --git a/examples/people.py b/examples/people.py index c8c2e39..5f1619b 100755 --- a/examples/people.py +++ b/examples/people.py @@ -29,7 +29,7 @@ __author__ = "Jose Bogarín Solano" __author_email__ = "jose@bogarin.co.cr" -__contributors__ = ["Chris Lunsford "] +__contributors__ = ["Chris Lunsford "] __copyright__ = "Copyright (c) 2016-2024 Cisco and/or its affiliates." __license__ = "MIT" diff --git a/examples/pyramidWebexTeamsBot/pyramidWebexTeamsBot/__init__.py b/examples/pyramidWebexTeamsBot/pyramidWebexTeamsBot/__init__.py index 9be7cb0..76fed61 100755 --- a/examples/pyramidWebexTeamsBot/pyramidWebexTeamsBot/__init__.py +++ b/examples/pyramidWebexTeamsBot/pyramidWebexTeamsBot/__init__.py @@ -24,7 +24,7 @@ __author__ = "Jose Bogarín Solano" __author_email__ = "jose@bogarin.co.cr" -__contributors__ = ["Chris Lunsford "] +__contributors__ = ["Chris Lunsford "] __copyright__ = "Copyright (c) 2016-2024 Cisco and/or its affiliates." __license__ = "MIT" diff --git a/examples/pyramidWebexTeamsBot/pyramidWebexTeamsBot/views.py b/examples/pyramidWebexTeamsBot/pyramidWebexTeamsBot/views.py index 721e6e8..f87734a 100755 --- a/examples/pyramidWebexTeamsBot/pyramidWebexTeamsBot/views.py +++ b/examples/pyramidWebexTeamsBot/pyramidWebexTeamsBot/views.py @@ -47,7 +47,7 @@ __author_email__ = "jose@bogarin.co.cr" __contributors__ = [ "Brad Bester ", - "Chris Lunsford ", + "Chris Lunsford ", ] __copyright__ = "Copyright (c) 2016-2024 Cisco and/or its affiliates." __license__ = "MIT" diff --git a/examples/pyramidWebexTeamsBot/setup.py b/examples/pyramidWebexTeamsBot/setup.py index 1f99d24..91981f5 100755 --- a/examples/pyramidWebexTeamsBot/setup.py +++ b/examples/pyramidWebexTeamsBot/setup.py @@ -24,7 +24,7 @@ __author__ = "Jose Bogarín Solano" __author_email__ = "jose@bogarin.co.cr" -__contributors__ = ["Chris Lunsford "] +__contributors__ = ["Chris Lunsford "] __copyright__ = "Copyright (c) 2016-2024 Cisco and/or its affiliates." __license__ = "MIT" diff --git a/src/webexpythonsdk/_metadata.py b/src/webexpythonsdk/_metadata.py index c402106..430503a 100644 --- a/src/webexpythonsdk/_metadata.py +++ b/src/webexpythonsdk/_metadata.py @@ -27,6 +27,6 @@ __url__ = "https://github.com/WebexCommunity/WebexPythonSDK" __download_url__ = "https://pypi.python.org/pypi/webexpythonsdk" __author__ = "Chris Lunsford" -__author_email__ = "chrlunsf@cisco.com" +__author_email__ = "cm@lunsford.io" __copyright__ = "Copyright (c) 2016-2024 Cisco and/or its affiliates." __license__ = "MIT" From 2088de89504d001fb1464bc2c2a53518cc0b8669 Mon Sep 17 00:00:00 2001 From: Chris Lunsford Date: Sun, 23 Jun 2024 23:14:46 -0400 Subject: [PATCH 18/22] Add developer productivity configs VS Code configurations: - Workspace settings - Recommended extensions --- .vscode/extensions.json | 11 +++++++++++ .vscode/settings.json | 6 ++++++ 2 files changed, 17 insertions(+) create mode 100644 .vscode/extensions.json create mode 100644 .vscode/settings.json diff --git a/.vscode/extensions.json b/.vscode/extensions.json new file mode 100644 index 0000000..41f6e84 --- /dev/null +++ b/.vscode/extensions.json @@ -0,0 +1,11 @@ +{ + "recommendations": [ + "charliermarsh.ruff", + "github.vscode-github-actions", + "github.vscode-pull-request-github", + "ms-python.debugpy", + "ms-python.python", + "ms-python.vscode-pylance", + "streetsidesoftware.code-spell-checker" + ] +} diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..2d64122 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,6 @@ +{ + "python.testing.unittestEnabled": false, + "python.testing.pytestEnabled": true, + "python.testing.pytestArgs": ["-s", "-m", "not slow and not manual"], + "cSpell.words": ["webexpythonsdk"] +} From c43336f469a4d55b828d047ac024a2a3990807f1 Mon Sep 17 00:00:00 2001 From: Chris Lunsford Date: Sat, 20 Jul 2024 21:17:48 -0400 Subject: [PATCH 19/22] Update docs - Add migration guide - Update contributor page - Update README - Correct some formatting issues --- README.rst | 89 ++++++++++++++++++++--------------- docs/contributing.rst | 43 ++++++++++------- docs/index.rst | 13 ++--- docs/user/migrate.rst | 107 ++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 192 insertions(+), 60 deletions(-) create mode 100644 docs/user/migrate.rst diff --git a/README.rst b/README.rst index 1f96fc4..acd4295 100644 --- a/README.rst +++ b/README.rst @@ -13,20 +13,19 @@ webexpythonsdk .. image:: https://readthedocs.org/projects/webexpythonsdk/badge/?version=latest :target: http://webexpythonsdk.readthedocs.io/en/latest/?badge=latest ------------------------------------------------------------------------------------------------------------------------- +--------------------------------------------------------------------------------------------------- +Welcome to the new **webexpythonsdk** library! The latest release removes support for Python v2 and +is compatible with Python v3.10+. The new Webex Python SDK replaces the previous `webexteamssdk`_; +and with the exception of the Python version support and the name change, the two libraries are +functionally equivalent. The new library is the recommended choice for new projects, and +webexteamssdk users are encouraged to `migrate`_ to **webexpythonsdk**. -**webexpythonsdk** v1.7 will be the last 🤞 release of the `webexpythonsdk` package. This will be the last release -supporting Python v2 and v3 compatibility; it is compatible Python v3 releases *up to Python v3.10*. +--------------------------------------------------------------------------------------------------- -Going forward, the `webexpythonsdk` package will be replaced by the `WebexPythonSDK` package, which will support Python -v3.10+. ------------------------------------------------------------------------------------------------------------------------- - - -**webexpythonsdk** is a *community developed* Python library for working with the Webex APIs. Our goal is to make -working with Webex in Python a *native* and *natural* experience! +**webexpythonsdk** is a *community developed* Python library for working with the Webex APIs. Our +goal is to make working with Webex in Python a *native* and *natural* experience! .. code-block:: Python @@ -55,8 +54,8 @@ working with Webex in Python a *native* and *natural* experience! files=["https://www.webex.com/content/dam/wbx/us/images/navigation/CiscoWebex-Logo_white.png"]) -That's more than 6 Webex API calls in less than 23 lines of code (with comments and whitespace), and likely more -than that, since webexpythonsdk handles pagination_ for you automatically! +That's more than 6 Webex API calls in less than 23 lines of code (with comments and whitespace), +and likely more than that, since webexpythonsdk handles pagination_ for you automatically! webexpythonsdk makes your life better... `Learn how!`__ @@ -70,8 +69,8 @@ webexpythonsdk does all of this for you: * Transparently sources your Webex access token from your local environment -* Provides and uses default arguments and settings everywhere possible, so you don't have to think about things like API - endpoint URLs, HTTP headers and JSON formats +* Provides and uses default arguments and settings everywhere possible, so you don't have to think + about things like API endpoint URLs, HTTP headers and JSON formats * Represents all Webex API interactions using native Python tools @@ -130,18 +129,18 @@ __ Contribution_ Release Notes ------------- -Please see the releases_ page for release notes on the incremental functionality and bug fixes incorporated into the -published releases. +Please see the releases_ page for release notes on the incremental functionality and bug fixes +incorporated into the published releases. Questions, Support & Discussion ------------------------------- -webexpythonsdk is a *community developed* and *community-supported* project. If you experience any issues using this -package, please report them using the issues_ page. +webexpythonsdk is a *community developed* and *community-supported* project. If you experience any +issues using this package, please report them using the issues_ page. -Please join the `Python Webex Devs`__ Webex space to ask questions, join the discussion, and share your -projects and creations. +Please join the `Python Webex Devs`__ Webex space to ask questions, join the discussion, and share +your projects and creations. __ Community_ @@ -149,38 +148,52 @@ __ Community_ Contribution ------------ -webexpythonsdk is a community development project. Feedback, thoughts, ideas, and code contributions are welcome! -Please see the `Contributing`_ guide for more information. +webexpythonsdk is a community development project. Feedback, thoughts, ideas, and code +contributions are welcome! Please see the `Contributing`_ guide for more information. History ------- -The Webex Python SDK (webexpythonsdk) library started as Cisco Spark API (ciscosparkapi). We updated the library's name in -alignment with Cisco's re-brand of Cisco Spark to Webex. The Cisco Spark API library has been deprecated and is no -longer supported; however, its open-source codebase is still available in the `ciscosparkapi`_ branch of this -repository. +The Webex Python SDK (webexpythonsdk) library started as Cisco Spark API (ciscosparkapi) which +became Webex Teams SDK and then Webex Python SDK (webexpythonsdk). We updated the library's name in +alignment with Cisco's re-brand of Cisco Spark to Webex and then again to align the name with the +broader set of Webex APIs accessible via the SDK (meetings, recordings, etc.). The previous +versions of the library are deprecated and no longer supported; however, their open-source codebase +is still available in the `release/v0/ciscosparkapi`_ and `release/v1/webexteamssdk`_ branches in +this repository. + +* `webexpythonsdk`_ (current) is compatible with Python v3.10+ and is the recommended library for + new projects. -The development team may make additional name changes as the library evolves with the Webex APIs published on -developer.webex.com. +* `webexteamssdk`_ (deprecated) is compatible with Python v2 and v3 (<= v3.10) and is still + available for existing projects. Users are encouraged to migrate to `webexpythonsdk`_. + +* `ciscosparkapi`_ (deprecated) is compatible with Python v2 and v3 (<= v3.6) and should no longer + be used. *Copyright (c) 2016-2024 Cisco and/or its affiliates.* -.. _Release Plan: https://github.com/WebexCommunity/WebexPythonSDK/wiki/Release-Plans -.. _Introduction: http://webexpythonsdk.readthedocs.io/en/latest/user/intro.html -.. _pagination: https://developer.webex.com/docs/basics#pagination -.. _webexpythonsdk.readthedocs.io: https://webexpythonsdk.readthedocs.io -.. _Quickstart: http://webexpythonsdk.readthedocs.io/en/latest/user/quickstart.html +.. _ciscosparkapi: `_release/v0/ciscosparkapi`_ +.. _Community: https://eurl.io/#HkMxO-_9- +.. _Contributing: https://github.com/WebexCommunity/WebexPythonSDK/blob/master/docs/contributing.rst .. _examples: https://github.com/WebexCommunity/WebexPythonSDK/tree/master/examples -.. _webexpythonsdk: https://github.com/WebexCommunity/WebexPythonSDK +.. _Introduction: http://webexpythonsdk.readthedocs.io/en/latest/user/intro.html .. _issues: https://github.com/WebexCommunity/WebexPythonSDK/issues -.. _Community: https://eurl.io/#HkMxO-_9- +.. _migrate: https://webexpythonsdk.readthedocs.io/en/latest/user/migrate.html +.. _pagination: https://developer.webex.com/docs/basics#pagination .. _projects: https://github.com/WebexCommunity/WebexPythonSDK/projects +.. _pull request: `pull requests`_ .. _pull requests: https://github.com/WebexCommunity/WebexPythonSDK/pulls +.. _Quickstart: http://webexpythonsdk.readthedocs.io/en/latest/user/quickstart.html +.. _Release Plan: https://github.com/WebexCommunity/WebexPythonSDK/wiki/Release-Plans +.. _release/v0/ciscosparkapi: https://github.com/WebexCommunity/WebexPythonSDK/tree/release/v0/ciscosparkapi +.. _release/v1/webexteamssdk: https://github.com/WebexCommunity/WebexPythonSDK/tree/release/v1/webexteamssdk .. _releases: https://github.com/WebexCommunity/WebexPythonSDK/releases .. _the repository: webexpythonsdk_ -.. _pull request: `pull requests`_ -.. _Contributing: https://github.com/WebexCommunity/WebexPythonSDK/blob/master/docs/contributing.rst -.. _ciscosparkapi: https://github.com/CiscoDevNet/ciscosparkapi/tree/ciscosparkapi +.. _webexpythonsdk: https://github.com/WebexCommunity/WebexPythonSDK +.. _webexpythonsdk: https://github.com/WebexCommunity/WebexPythonSDK +.. _webexpythonsdk.readthedocs.io: https://webexpythonsdk.readthedocs.io +.. _webexteamssdk: `_release/v1/webexteamssdk`_ diff --git a/docs/contributing.rst b/docs/contributing.rst index 2ddc69e..ec85a08 100644 --- a/docs/contributing.rst +++ b/docs/contributing.rst @@ -12,18 +12,15 @@ How to contribute Feedback, Issues, Thoughts and Ideas Please use the `issues`_ page to report issues or post ideas for enhancement. -Join our `Webex Python SDK - Python Community Contributors `_ Webex space to join the conversation with other contributors to this project. - - Interested in Contributing Code? ================================ -Developer Scripts ------------------ +Common Developer Tasks +---------------------- -We have created some scripts to automate everyday actions needed when working on the project. Please see the `script`_ directory, and it's README for more information. +See the project's `Makefile` targets for a list of common developer tasks, which you can run by simply running `make ` from the repository root directory. Notes on the Test Suite @@ -41,19 +38,28 @@ Contributing Code 2. Fork a copy of the `repository`_ and clone your forked repository to your development environment. -3. Run ``script/setup`` to install the development dependencies and setup your environment. +3. Use the ``setup`` target to install the project dependencies and setup your environment for development. + + .. code-block:: bash + + make setup -4. Configure the following environment variables in your development environment: +4. Add your code to your forked repository. - * ``WEBEX_ACCESS_TOKEN`` - Your test account's Webex access token. + If you are creating some new feature or functionality (excellent!), please also write tests to verify that your code works as expected. -5. Add your code to your forked repository. +5. Please format your code and make sure your code passes the linter. - If you are creating some new feature or functionality (excellent!), please also write a `test`_ to verify that your code works as expected. + .. code-block:: bash -6. We follow `PEP8`_ reasonably strictly for this project. Please make sure your code passes the linter. + make format + make lint - Run ``script/test lint`` or simply run ``flake8`` from the project root. +6. If you running the test suite locally, ensure your code passes all of the default tests. Use the ``test`` target and ensure all tests execute successfully. + + .. code-block:: bash + + make test 7. Commit your changes. @@ -63,7 +69,7 @@ Contributing Code Running the Test Suite Locally ------------------------------ -Configure the following environment variables in your development environment: +To run the test suite locally, you must configure the following environment variables in your development environment: * ``WEBEX_ACCESS_TOKEN`` - Your test account's Webex access token. @@ -83,12 +89,17 @@ Configure the following environment variables in your development environment: export WEBEX_TEST_ID_START=42 export WEBEX_TEST_FILE_URL="https://www.webex.com/content/dam/wbx/us/images/navigation/CiscoWebex-Logo_white.png" -Ensure your code passes all of the default tests. Run ``script/test`` and ensure all tests execute successfully. +If you are updating or testing the guest issuer functionality, you will also need to configure the following environment variables: + +* ``WEBEX_GUEST_ISSUER_ID`` - The issuer ID for the guest issuer account. +* ``WEBEX_GUEST_ISSUER_SECRET`` - The issuer secret for the guest issuer account. + + +Ensure your code passes all of the default tests. Run ``make test`` and ensure all tests execute successfully. .. _script: https://github.com/WebexCommunity/WebexPythonSDK/tree/master/script .. _issues: https://github.com/WebexCommunity/WebexPythonSDK/issues .. _repository: https://github.com/WebexCommunity/WebexPythonSDK .. _test: https://github.com/WebexCommunity/WebexPythonSDK/tree/master/tests -.. _PEP8: https://www.python.org/dev/peps/pep-0008/ .. _pull request: https://github.com/WebexCommunity/WebexPythonSDK/pulls diff --git a/docs/index.rst b/docs/index.rst index 8da377c..cdf2fb2 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -1,18 +1,18 @@ .. currentmodule:: webexpythonsdk -============= -webexpythonsdk -============= +============== +WebexPythonSDK +============== *Simple, lightweight, scalable Python API wrapper for the Webex APIs* ------------------------------------------------------------------------------- -Welcome to the docs! webexpythonsdk is a *community developed* Pythonic wrapping of the Webex APIs. The package represents all of the Cisco Webex API interactions via native Python tools. Making working with the Cisco Webex APIs in Python a *native* and *natural* experience. +Welcome to the docs! ``webexpythonsdk`` is a *community developed* Pythonic wrapping of the Webex APIs. The package represents all of the Cisco Webex API interactions via native Python tools. Making working with the Cisco Webex APIs in Python a *native* and *natural* experience. -**webexpythonsdk helps you get things done faster.** We take care of the API semantics, and you can focus on writing your code. +``webexpythonsdk`` **helps you get things done faster.** We take care of the API semantics, and you can focus on writing your code. -With webexpythonsdk, you can easily: +With ``webexpythonsdk``, you can easily: * Interact with the Webex APIs in an interactive Python session @@ -30,6 +30,7 @@ The User Guide :maxdepth: 2 installation + user/migrate user/intro user/quickstart user/api diff --git a/docs/user/migrate.rst b/docs/user/migrate.rst new file mode 100644 index 0000000..e8963e3 --- /dev/null +++ b/docs/user/migrate.rst @@ -0,0 +1,107 @@ +.. _Migrate: + +.. currentmodule:: webexpythonsdk + +========= +Migration +========= + +This *should* 🤞 be easy! + +``webexpythonsdk`` is designed to be a drop-in replacement for the ``webexteamssdk`` package. The SDK interface and data objects are largely unchanged with only a few minor name changes. + +Major changes that you should be aware of: + +* The package name has changed from ``webexteamssdk`` to ``webexpythonsdk`` +* ``webexpythonsdk`` drops support for Python v2, and supports Python 3.10+ +* The primary API object has changed from ``WebexTeamsAPI`` to ``WebexAPI`` + + + +--------------- +Migration Guide +--------------- + +TL;DR: Update the package dependency, environment variables, imports, and primary API object. + +The following table summarizes the name changes that need to be made to migrate from +``webexteamssdk`` to ``webexpythonsdk``: + ++------------------------------+------------------------+-----------------------------------+ +| Old Name | New Name | Description | ++==============================+========================+===================================+ +| ``webexteamssdk`` | ``webexpythonsdk`` | Package name | ++------------------------------+------------------------+-----------------------------------+ +| ``WebexTeamsAPI`` | ``WebexAPI`` | Primary API object | ++------------------------------+------------------------+-----------------------------------+ +| ``WEBEX_TEAMS_ACCESS_TOKEN`` | ``WEBEX_ACCESS_TOKEN`` | Access token environment variable | ++------------------------------+------------------------+-----------------------------------+ + +*Note:* The old ``WEBEX_TEAMS_ACCESS_TOKEN`` environment variable should continue to work with the new package; however, you will receive a deprecation warning. It is recommended to update the environment variable name to ``WEBEX_ACCESS_TOKEN``. + +**Doing a quick search-and-replace in your codebase should be all you need to do to migrate.** + +Detailed Steps +-------------- + +1. Update Package + + Ensure you update the package in your project's dependencies: + + .. code-block:: bash + + pip uninstall webexteamssdk + pip install webexpythonsdk + + +2. Update Environment Variables + + If you are using the ``WEBEX_TEAMS_ACCESS_TOKEN`` environment variable, you will need to update it to ``WEBEX_ACCESS_TOKEN``. + +3. Codebase Changes + + **Imports:** Replace all imports from ``webexteamssdk`` to ``webexpythonsdk``. + + **Primary API Object:** Replace all instances of ``WebexTeamsAPI`` with ``WebexAPI``. + +---------------- +For Contributors +---------------- + +Project changes that you should be aware of: + +- Tooling changes: + - Using GitHub Actions for CI/CD + - Using `poetry`_ for packaging and dependency management + - Using `poetry-dynamic-versioning`_ for version management + - Using `ruff`_ for linting and code formatting + - Using `make`_ to automate common tasks +- The test suite environment variable names have changed: + + +-------------------------------------+-------------------------------+ + | Old Environment Variable | New Environment Variable | + +=====================================+===============================+ + | ``WEBEX_TEAMS_ACCESS_TOKEN`` | ``WEBEX_ACCESS_TOKEN`` | + +-------------------------------------+-------------------------------+ + | ``WEBEX_TEAMS_TEST_DOMAIN`` | ``WEBEX_TEST_DOMAIN`` | + +-------------------------------------+-------------------------------+ + | ``WEBEX_TEAMS_TEST_ID_START`` | ``WEBEX_TEST_ID_START`` | + +-------------------------------------+-------------------------------+ + | ``WEBEX_TEAMS_TEST_FILE_URL`` | ``WEBEX_TEST_FILE_URL`` | + +-------------------------------------+-------------------------------+ + | ``WEBEX_TEAMS_GUEST_ISSUER_ID`` | ``WEBEX_GUEST_ISSUER_ID`` | + +-------------------------------------+-------------------------------+ + | ``WEBEX_TEAMS_GUEST_ISSUER_SECRET`` | ``WEBEX_GUEST_ISSUER_SECRET`` | + +-------------------------------------+-------------------------------+ + + +*Copyright (c) 2016-2024 Cisco and/or its affiliates.* + + +.. _Webex: https://www.webex.com/products/teams/index.html +.. _developer.webex.com: https://developer.webex.com/ +.. _issues: https://github.com/WebexCommunity/WebexPythonSDK/issues +.. _poetry: https://python-poetry.org/ +.. _poetry-dynamic-versioning: https://github.com/mtkennerly/poetry-dynamic-versioning +.. _ruff: https://docs.astral.sh/ruff/ +.. _make: https://www.gnu.org/software/make/ \ No newline at end of file From 98a976c162ac9a2fcf5d54c1c1d2e8395450590c Mon Sep 17 00:00:00 2001 From: Chris Lunsford Date: Sat, 20 Jul 2024 21:18:36 -0400 Subject: [PATCH 20/22] Update docs versioning mechanism --- docs/conf.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index 55381ea..c3b9a77 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -5,14 +5,14 @@ sys.path.insert(0, os.path.abspath("..")) -from webexpythonsdk._version import get_versions +import webexpythonsdk project = "webexpythonsdk" copyright = "Copyright (c) 2016-2024 Cisco and/or its affiliates." author = "Chris Lunsford" -version = get_versions()["version"] -release = get_versions()["version"] +version = webexpythonsdk.__version__ +release = webexpythonsdk.__version__ language = "en" From 06c9495e94f76cb9cc5fa587285066252b42da64 Mon Sep 17 00:00:00 2001 From: Chris Lunsford Date: Sat, 20 Jul 2024 21:19:15 -0400 Subject: [PATCH 21/22] Fix the WEBEX_TEAMS_ACCESS_TOKEN legacy env var name --- src/webexpythonsdk/config.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/webexpythonsdk/config.py b/src/webexpythonsdk/config.py index 4b21fa1..ade52d1 100644 --- a/src/webexpythonsdk/config.py +++ b/src/webexpythonsdk/config.py @@ -33,7 +33,7 @@ LEGACY_ACCESS_TOKEN_ENVIRONMENT_VARIABLES = [ "SPARK_ACCESS_TOKEN", "CISCO_SPARK_ACCESS_TOKEN", - "WEBEX_ACCESS_TOKEN", + "WEBEX_TEAMS_ACCESS_TOKEN", ] WEBEX_DATETIME_FORMAT = "%Y-%m-%dT%H:%M:%S.%fZ" From 95f6157dc02e6e46f6e17db1c827a104363ffd4f Mon Sep 17 00:00:00 2001 From: Chris Lunsford Date: Sat, 20 Jul 2024 21:19:42 -0400 Subject: [PATCH 22/22] Add custom spelling works for cSpell --- .vscode/settings.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.vscode/settings.json b/.vscode/settings.json index 2d64122..c034616 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -2,5 +2,5 @@ "python.testing.unittestEnabled": false, "python.testing.pytestEnabled": true, "python.testing.pytestArgs": ["-s", "-m", "not slow and not manual"], - "cSpell.words": ["webexpythonsdk"] + "cSpell.words": ["ciscosparkapi", "webexpythonsdk", "webexteamssdk"] }