diff --git a/PKG-INFO b/PKG-INFO new file mode 100644 index 0000000..3998adc --- /dev/null +++ b/PKG-INFO @@ -0,0 +1,48 @@ +Metadata-Version: 2.1 +Name: swh.web.client +Version: 0.2.0 +Summary: Software Heritage Web client +Home-page: https://forge.softwareheritage.org/source/swh-web-client/ +Author: Software Heritage developers +Author-email: swh-devel@inria.fr +License: UNKNOWN +Project-URL: Bug Reports, https://forge.softwareheritage.org/maniphest +Project-URL: Funding, https://www.softwareheritage.org/donate +Project-URL: Source, https://forge.softwareheritage.org/source/swh-web-client +Project-URL: Documentation, https://docs.softwareheritage.org/devel/swh-web-client/ +Description: Software Heritage - Web client + ============================== + + Client for Software Heritage Web applications, via their APIs. + + + Sample usage + ------------ + + .. code-block:: python + + from swh.web.client.client import WebAPIClient + cli = WebAPIClient() + + # retrieve any archived object via its SWHID + cli.get('swh:1:rev:aafb16d69fd30ff58afdd69036a26047f3aebdc6') + + # same, but for specific object types + cli.revision('swh:1:rev:aafb16d69fd30ff58afdd69036a26047f3aebdc6') + + # get() always retrieve entire objects, following pagination + # WARNING: this might *not* be what you want for large objects + cli.get('swh:1:snp:6a3a2cf0b2b90ce7ae1cf0a221ed68035b686f5a') + + # type-specific methods support explicit iteration through pages + next(cli.snapshot('swh:1:snp:cabcc7d7bf639bbe1cc3b41989e1806618dd5764')) + +Platform: UNKNOWN +Classifier: Programming Language :: Python :: 3 +Classifier: Intended Audience :: Developers +Classifier: License :: OSI Approved :: GNU General Public License v3 (GPLv3) +Classifier: Operating System :: OS Independent +Classifier: Development Status :: 3 - Alpha +Requires-Python: >=3.7 +Description-Content-Type: text/x-rst +Provides-Extra: testing diff --git a/README.rst b/README.rst deleted file mode 120000 index cffceba..0000000 --- a/README.rst +++ /dev/null @@ -1 +0,0 @@ -docs/README.rst \ No newline at end of file diff --git a/README.rst b/README.rst new file mode 100644 index 0000000..02cd253 --- /dev/null +++ b/README.rst @@ -0,0 +1,26 @@ +Software Heritage - Web client +============================== + +Client for Software Heritage Web applications, via their APIs. + + +Sample usage +------------ + +.. code-block:: python + + from swh.web.client.client import WebAPIClient + cli = WebAPIClient() + + # retrieve any archived object via its SWHID + cli.get('swh:1:rev:aafb16d69fd30ff58afdd69036a26047f3aebdc6') + + # same, but for specific object types + cli.revision('swh:1:rev:aafb16d69fd30ff58afdd69036a26047f3aebdc6') + + # get() always retrieve entire objects, following pagination + # WARNING: this might *not* be what you want for large objects + cli.get('swh:1:snp:6a3a2cf0b2b90ce7ae1cf0a221ed68035b686f5a') + + # type-specific methods support explicit iteration through pages + next(cli.snapshot('swh:1:snp:cabcc7d7bf639bbe1cc3b41989e1806618dd5764')) diff --git a/setup.cfg b/setup.cfg index bc98e76..9aa3661 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,9 +1,11 @@ [flake8] -# E203: whitespaces before ':' -# E231: missing whitespace after ',' -# W503: line break before binary operator ignore = E203,E231,W503 max-line-length = 88 [radon] exclude = swh/web/client/tests/api_data.py + +[egg_info] +tag_build = +tag_date = 0 + diff --git a/swh.web.client.egg-info/PKG-INFO b/swh.web.client.egg-info/PKG-INFO new file mode 100644 index 0000000..3998adc --- /dev/null +++ b/swh.web.client.egg-info/PKG-INFO @@ -0,0 +1,48 @@ +Metadata-Version: 2.1 +Name: swh.web.client +Version: 0.2.0 +Summary: Software Heritage Web client +Home-page: https://forge.softwareheritage.org/source/swh-web-client/ +Author: Software Heritage developers +Author-email: swh-devel@inria.fr +License: UNKNOWN +Project-URL: Bug Reports, https://forge.softwareheritage.org/maniphest +Project-URL: Funding, https://www.softwareheritage.org/donate +Project-URL: Source, https://forge.softwareheritage.org/source/swh-web-client +Project-URL: Documentation, https://docs.softwareheritage.org/devel/swh-web-client/ +Description: Software Heritage - Web client + ============================== + + Client for Software Heritage Web applications, via their APIs. + + + Sample usage + ------------ + + .. code-block:: python + + from swh.web.client.client import WebAPIClient + cli = WebAPIClient() + + # retrieve any archived object via its SWHID + cli.get('swh:1:rev:aafb16d69fd30ff58afdd69036a26047f3aebdc6') + + # same, but for specific object types + cli.revision('swh:1:rev:aafb16d69fd30ff58afdd69036a26047f3aebdc6') + + # get() always retrieve entire objects, following pagination + # WARNING: this might *not* be what you want for large objects + cli.get('swh:1:snp:6a3a2cf0b2b90ce7ae1cf0a221ed68035b686f5a') + + # type-specific methods support explicit iteration through pages + next(cli.snapshot('swh:1:snp:cabcc7d7bf639bbe1cc3b41989e1806618dd5764')) + +Platform: UNKNOWN +Classifier: Programming Language :: Python :: 3 +Classifier: Intended Audience :: Developers +Classifier: License :: OSI Approved :: GNU General Public License v3 (GPLv3) +Classifier: Operating System :: OS Independent +Classifier: Development Status :: 3 - Alpha +Requires-Python: >=3.7 +Description-Content-Type: text/x-rst +Provides-Extra: testing diff --git a/swh.web.client.egg-info/SOURCES.txt b/swh.web.client.egg-info/SOURCES.txt new file mode 100644 index 0000000..032f99c --- /dev/null +++ b/swh.web.client.egg-info/SOURCES.txt @@ -0,0 +1,51 @@ +.gitignore +.pre-commit-config.yaml +AUTHORS +CODE_OF_CONDUCT.md +CONTRIBUTORS +LICENSE +MANIFEST.in +Makefile +README.rst +api_data.py +mypy.ini +pyproject.toml +pytest.ini +requirements-swh.txt +requirements-test.txt +requirements.txt +setup.cfg +setup.py +tox.ini +debian/changelog +debian/compat +debian/control +debian/copyright +debian/rules +debian/source/format +docs/.gitignore +docs/Makefile +docs/README.rst +docs/conf.py +docs/index.rst +docs/_static/.placeholder +docs/_templates/.placeholder +swh/__init__.py +swh.web.client.egg-info/PKG-INFO +swh.web.client.egg-info/SOURCES.txt +swh.web.client.egg-info/dependency_links.txt +swh.web.client.egg-info/entry_points.txt +swh.web.client.egg-info/requires.txt +swh.web.client.egg-info/top_level.txt +swh/web/__init__.py +swh/web/client/__init__.py +swh/web/client/auth.py +swh/web/client/cli.py +swh/web/client/client.py +swh/web/client/py.typed +swh/web/client/tests/__init__.py +swh/web/client/tests/api_data.py +swh/web/client/tests/conftest.py +swh/web/client/tests/gen-api-data.sh +swh/web/client/tests/test_cli.py +swh/web/client/tests/test_web_api_client.py \ No newline at end of file diff --git a/swh.web.client.egg-info/dependency_links.txt b/swh.web.client.egg-info/dependency_links.txt new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/swh.web.client.egg-info/dependency_links.txt @@ -0,0 +1 @@ + diff --git a/swh.web.client.egg-info/entry_points.txt b/swh.web.client.egg-info/entry_points.txt new file mode 100644 index 0000000..ff3bcf2 --- /dev/null +++ b/swh.web.client.egg-info/entry_points.txt @@ -0,0 +1,4 @@ + + [swh.cli.subcommands] + auth=swh.web.client.cli + \ No newline at end of file diff --git a/swh.web.client.egg-info/requires.txt b/swh.web.client.egg-info/requires.txt new file mode 100644 index 0000000..ac49216 --- /dev/null +++ b/swh.web.client.egg-info/requires.txt @@ -0,0 +1,10 @@ +click +python-dateutil +requests +swh.core>=0.3 +swh.model + +[testing] +pytest +pytest-mock +requests_mock diff --git a/swh.web.client.egg-info/top_level.txt b/swh.web.client.egg-info/top_level.txt new file mode 100644 index 0000000..0cb0f8f --- /dev/null +++ b/swh.web.client.egg-info/top_level.txt @@ -0,0 +1 @@ +swh