From a42a34dc3816399ba883cba58822ca74d3b78715 Mon Sep 17 00:00:00 2001
From: crflynn https://pypistats.org/
Retrieve the aggregate download quantities for the last day/week/month. Query arguments: +
Retrieve the aggregate download quantities for the last day/week/month. +
+Query arguments:
week
or
- month
+ month. If omitted returns all values.
Retrieve the aggregate daily download time series with or without mirror downloads. Query arguments: +
Retrieve the aggregate daily download time series with or without mirror downloads. +
+Query arguments:
true
or
- false
- YYYY-MM-DD
- YYYY-MM-DD
+ false. If omitted returns both series data.
{
@@ -81,25 +76,19 @@
}
Retrieve the aggregate daily download time series by Python major version number. Query arguments: +
Retrieve the aggregate daily download time series by Python major version number. +
+Query arguments:
2
or
- 3
- YYYY-MM-DD
- YYYY-MM-DD
+ 3. If omitted returns all series data (including
+ null).
{
@@ -125,25 +114,19 @@
}
Retrieve the aggregate daily download time series by Python minor version number. Query arguments: +
Retrieve the aggregate daily download time series by Python minor version number. +
+Query arguments:
2.7
or
- 3.6
- YYYY-MM-DD
- YYYY-MM-DD
+ 3.6. If omitted returns all series data (including
+ null).
{
@@ -199,26 +182,21 @@
}
Retrieve the aggregate daily download time series by operating system. Query arguments: +
Retrieve the aggregate daily download time series by operating system. +
+Query arguments:
windows,
- linux, or
+ linux,
darwin
- (Mac OSX).
- YYYY-MM-DD
- YYYY-MM-DD
+ or
+ other. If omitted returns all series data (including
+ null).
{
diff --git a/pypistats/templates/index.html b/pypistats/templates/index.html
index 83b4da1..1e63503 100644
--- a/pypistats/templates/index.html
+++ b/pypistats/templates/index.html
@@ -3,14 +3,22 @@
{% block body %}
Analytics for PyPI packages
- Search for a python package on PyPI.
+
+ {% if not search %}
+ Search among
+ {{ "{:,.0f}".format(package_count) }}
+ python packages from PyPI (updated daily).
+ {% else %}
+ Search results:
+ {% endif %}
{% if search %}
+
{% include "results.html" %}
{% endif %}
{% endblock %}
\ No newline at end of file
diff --git a/pypistats/templates/layout.html b/pypistats/templates/layout.html
index c1f2d89..5efefb1 100644
--- a/pypistats/templates/layout.html
+++ b/pypistats/templates/layout.html
@@ -48,22 +48,24 @@
PyPI Stats
- Home
+ Search
- __all__
+ All packages
- __top__
+ Top packages
{% if user %}
- {{ user.username }}'s Packages
+ {{ user.username }}'s packages
{% else %}
- My Packages
+ Track packages
{% endif %}
- Logout
+ {% if user %}
+ Logout
+ {% endif %}
diff --git a/pypistats/templates/package.html b/pypistats/templates/package.html
index d1d7d4f..e0cfa48 100644
--- a/pypistats/templates/package.html
+++ b/pypistats/templates/package.html
@@ -23,30 +23,48 @@
{% else %}
- PyPI page
-
- Home page
-
- Author:
- {{metadata['info']['author']}}
-
- License:
- {{metadata['info']['license']}}
-
- Summary:
- {{metadata['info']['summary']}}
-
- Latest version:
- {{metadata['info']['version']}}
-
- Downloads last day:
- {{"{:,.0f}".format(recent['day'])}}
-
- Downloads last week:
- {{"{:,.0f}".format(recent['week'])}}
-
- Downloads last month:
- {{"{:,.0f}".format(recent['month'])}}
+ {% if metadata %}
+ PyPI page
+
+ Home page
+
+ Author:
+ {{metadata['info']['author']}}
+
+ License:
+ {% if metadata['info']['license'] | length > 200 %}
+
+ {{metadata['info']['license'][:200]}}...
+ {% else %}
+ {{metadata['info']['license']}}
+ {% endif %}
+
+ Summary :
+ {{metadata['info']['summary']}}
+
+ Latest version :
+ {{metadata['info']['version']}}
+
+ {% if metadata['requires'] %}
+ Requires:
+ {% for required in metadata['requires'] %}
+ {{required.lower()}}
+ {% if not loop.last %}|{% endif %}
+ {% endfor %}
+ {% endif %}
+
+ Downloads last day:
+ {{"{:,.0f}".format(recent['day'])}}
+
+ Downloads last week:
+ {{"{:,.0f}".format(recent['week'])}}
+
+ Downloads last month:
+ {{"{:,.0f}".format(recent['month'])}}
+ {% else %}
+ No metadata found.
+ {%endif%}
+
{% endif %}