Skip to main content

What's this?

Some tools to get data from pypi and kick it around, for fun and profit.

Minus the profit.

You can do stuff in python, but also have a CLI for most of the stuff.

$ python pipoke/pkg_vs_words.py is-not-a-pkg-name "numpy,exists,but,this_crazy_pkg,does,not"
{'this_crazy_pkg', 'but', 'exists', 'does'}

So 'numpy' and 'not' are already registered with pypi. But hey, the good news is 'but' and 'does' aren't. Inspired to write some code bearing that name?

Cool! How do I install it?

pip install pipoke

Enough said.

Play

from pipoke.pkg_vs_words import all_words, pkg_names
all_words  # set of all English words (according to wordnet)
pkg_names  # set of all PyPi package names. All at the point the list was slurped

You can have your own fun with that. Here are a few things to get you started.

All pkg_names that are valid English words:

from pipoke.pkg_vs_words import all_words, pkg_names
set(all_words).intersection(pkg_names)

All valid English words that are no "taken" by the pypi namespace:

from pipoke.pkg_vs_words import all_words, pkg_names
set(all_words).difference(pkg_names)

All english words, package names, and intersection of both... that end with py:

from pipoke.pkg_vs_words import words_and_pkg_names_satisfying_condition
words_and_pkg_names_satisfying_condition(lambda w: w.endswith('py'), print_counts=True)

All english words, package names, and intersection of both... that contain py or pi:

from pipoke.pkg_vs_words import words_and_pkg_names_satisfying_condition
import pipoke.word_conditions as wc
words_and_pkg_names_satisfying_condition(wc.contains_py_or_pi, print_counts=True)

Want to search with a regular expression? Got you covered. The above search is actually equivalent to:

from pipoke.pkg_vs_words import words_and_pkg_names_satisfying_regex
words_and_pkg_names_satisfying_regex('.*(py|pi).*', print_counts=True)

Get stuff

The repository comes with a data folder that contains a pickle containing a set of words (from wordnet) and a set of pypi package names (well {pkg_name: pkg_url_stub, } to be exact).

But you probably want to update that pypi list from time to time. And you can do so with

from pipoke.pypi_store import refresh_saved_pkg_name_stub
refresh_saved_pkg_name_stub()

Get dict of information for a pkg_name:

from pipoke.pypi_store import info_of_pkg_from_web
pkg_name = 'pipoke'
info_of_pkg_from_web(pkg_name)

And by the way

You have a CLI for many of these things too.

Metadata

Release files for pipoke 0.0.23

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pipoke 0.0.23
File Size Uploaded
pipoke-0.0.23.tar.gz 19.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pipoke 0.0.23
File Interpreter ABI Platform
pipoke-0.0.23-py3-none-any.whl Python 3 none any Details

Total release size: 39.4 kB

Release files / pipoke-0.0.23.tar.gz

Download URL pipoke-0.0.23.tar.gz
Size 19.1 kB
Tags Source
SHA-256 checksum
How to use checksums
376e86702c11dfe79ec59462c370c3b0f99816ab9a2aa5aafadeafbe6d3bccc7
BLAKE2b-256 checksum
How to use checksums
b00a2a6c19621ab9ee3919d699d9e9e138d5e1548529df5cc56bcd4f1b4bdd2d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.13

Release files / pipoke-0.0.23-py3-none-any.whl

Download URL pipoke-0.0.23-py3-none-any.whl
Size 20.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
93a6e3bdefef359ba22dad3b4bc98ba8db7b2d4c13a7e8b142134a8e73b85a2d
BLAKE2b-256 checksum
How to use checksums
2da01ff5f393f9d5c4696bdc01f4049c5aae15c2704615a6576f2efd89b5b646
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.13

Release history Release notifications | RSS feed

This release

0.0.23 This release

2 release files

0.0.22

2 release files

0.0.20

2 release files

0.0.19

2 release files

0.0.18

2 release files

0.0.17

2 release files

0.0.16

2 release files

0.0.15

2 release files

0.0.14

2 release files

0.0.13

2 release files

0.0.12

2 release files

0.0.11

2 release files

0.0.10

2 release files

0.0.9

2 release files

0.0.8

2 release files

0.0.7

2 release files

0.0.5

1 release file

0.0.4

2 release files

0.0.3

2 release files

0.0.2

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page