add some info about the pypistats client package

This commit is contained in:
crflynn
2018-10-28 18:26:43 -04:00
parent 2f1a620509
commit 75598eb17b
2 changed files with 31 additions and 2 deletions

View File

@@ -10,13 +10,30 @@
<p>Download stats are sourced from the Python Software Foundation's publicly available <p>Download stats are sourced from the Python Software Foundation's publicly available
<a href="https://bigquery.cloud.google.com/table/the-psf:pypi.downloads">download stats</a> <a href="https://bigquery.cloud.google.com/table/the-psf:pypi.downloads">download stats</a>
on Google BigQuery. All aggregate download stats ignore known PyPI mirrors (such as on Google BigQuery. All aggregate download stats ignore known PyPI mirrors (such as
<a href="{{ url_for('general.package_page', package='bandersnatch') }}">bandersnatch</a>) unless noted otherwise.</p> <a href="{{ url_for('general.package_page', package='bandersnatch') }}">bandersnatch</a>) unless noted
otherwise.</p>
<p>PyPI Stats attempts to operate within the free tier of its hosted services. For this reason, aggregate data is <p>PyPI Stats attempts to operate within the free tier of its hosted services. For this reason, aggregate data is
only retained for 180 days.</p> only retained for 180 days.</p>
<h3>API</h3> <h3>API</h3>
<p>A simple <p>A simple
<a href="{{ url_for('api.api') }}">JSON API</a> <a href="{{ url_for('api.api') }}">JSON API</a>
is available for aggregate download stats and time series for packages.</p> is available for aggregate download stats and time series for packages.</p>
<h3>Downstream</h3>
<p>
<ul>
<li>
<a href="{{ url_for('general.package_page', package='pypistats') }}">pypistats</a> is a <a
href="https://github.com/hugovk/pypistats">python package</a> that provides a client and CLI tool for
the pypistats.org JSON API</a>
</li>
<li>
<a href="https://shields.io/#/examples/downloads">shields.io</a> uses the pypistats.org JSON API to provide
download count badges, like this one for <a
href="{{ url_for('general.package_page', package='pypistats') }}">pypistats</a> <a
href="https://github.com/hugovk/pypistats"><img src="https://img.shields.io/pypi/dm/pypistats.svg"></a>
</li>
</ul>
</p>
<h3>Tech</h3> <h3>Tech</h3>
<p>PyPI Stats is a project developed using Python 3.6. Here are some of the tools used to create it: <p>PyPI Stats is a project developed using Python 3.6. Here are some of the tools used to create it:
<ul> <ul>
@@ -64,5 +81,8 @@
<p>PyPI Stats was created by <p>PyPI Stats was created by
<a href="https://flynn.gg">Christopher Flynn</a>. <a href="https://flynn.gg">Christopher Flynn</a>.
</p> </p>
<p>
Thanks to <a href="https://github.com/hugovk">Hugo (hugovk)</a> for providing a client interface to the API.
</p>
{% endblock %} {% endblock %}

View File

@@ -12,12 +12,21 @@
<p> <p>
<ul> <ul>
<li>All download stats exclude known mirrors (such as <li>All download stats exclude known mirrors (such as
<a href="{{ url_for('general.package_page', package='bandersnatch') }}">bandersnatch</a>) unless noted otherwise. <a href="{{ url_for('general.package_page', package='bandersnatch') }}">bandersnatch</a>) unless noted
otherwise.
</li> </li>
<li>Time series data is retained only for 180 days.</li> <li>Time series data is retained only for 180 days.</li>
<li>All download data is updated once daily.</li> <li>All download data is updated once daily.</li>
</ul> </ul>
</p> </p>
<h2>API Client</h2>
<p>
The <a href="{{ url_for('general.package_page', package='pypistats') }}">pypistats</a> <a
href="https://pypi.org/project/pypistats">package</a> is a python client and CLI tool for easily
accessing, aggregating, and formatting results from the API. To install, use pip:
<pre><code>pip install -U pypistats</code></pre>
Refer to the <a href="https://github.com/hugovk/pypistats">documentation</a> for usage.
</p>
<h2>Endpoints</h2> <h2>Endpoints</h2>
<h3>/api/packages/&lt;package&gt;/recent</h3> <h3>/api/packages/&lt;package&gt;/recent</h3>
<p>Retrieve the aggregate download quantities for the last day/week/month. <p>Retrieve the aggregate download quantities for the last day/week/month.