diff --git a/README.md b/README.md index ee6a14a..d0a95e7 100644 --- a/README.md +++ b/README.md @@ -296,6 +296,22 @@ Estimated cost: $0.01 | Total | | | 60 | ``` +Check how many downloads came from continuous integration servers: + +```console +❯ pypinfo --percent --days 5 pillow ci +Served from cache: False +Data processed: 384.22 MiB +Data billed: 385.00 MiB +Estimated cost: $0.01 + +| ci | percent | download_count | +| ----- | ------- | -------------- | +| None | 79.37% | 11,963,127 | +| True | 20.63% | 3,109,931 | +| Total | | 15,073,058 | +``` + ## Installation diff --git a/pypinfo/cli.py b/pypinfo/cli.py index 36c3ecc..52b0f79 100644 --- a/pypinfo/cli.py +++ b/pypinfo/cli.py @@ -37,6 +37,7 @@ OpenSSLVersion, Distro, DistroVersion, + CI, CPU, Libc, LibcVersion, @@ -67,6 +68,7 @@ 'system-release': SystemRelease, 'distro': Distro, 'distro-version': DistroVersion, + 'ci': CI, 'cpu': CPU, 'libc': Libc, 'libc-version': LibcVersion, @@ -121,7 +123,7 @@ def pypinfo( """Valid fields are:\n project | version | file | pyversion | percent3 | percent2 | impl | impl-version |\n openssl | date | month | year | country | installer | installer-version |\n - setuptools-version | system | system-release | distro | distro-version | cpu |\n + setuptools-version | system | system-release | distro | distro-version | ci | cpu |\n libc | libc-version """ if auth: diff --git a/pypinfo/fields.py b/pypinfo/fields.py index 91a1d1f..da91c70 100644 --- a/pypinfo/fields.py +++ b/pypinfo/fields.py @@ -28,6 +28,7 @@ SystemRelease = Field('system_release', 'details.system.release') Distro = Field('distro_name', 'details.distro.name') DistroVersion = Field('distro_version', 'details.distro.version') +CI = Field('ci', 'details.ci') CPU = Field('cpu', 'details.cpu') Libc = Field('libc_name', 'details.distro.libc.lib') LibcVersion = Field('libc_version', 'details.distro.libc.version')