yp


Nameyp JSON
Version 0.0.6 PyPI version JSON
download
home_pagehttps://github.com/thorwhalen/yp
SummaryA mapping view to pypi projects
upload_time2024-01-18 08:37:15
maintainer
docs_urlNone
authorThor Whalen
requires_python
licenseapache-2.0
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # yp

A mapping view to pypi projects

To install:	```pip install yp```

See also: `pipoke`, for more pypi interaction tools.

# Example Usage

Get a mapping of all of ``pypi`` projects.

    >>> from yp import Pypi
    >>> p = Pypi()

The keys of this mapping are the project names. There are lots!

    >>> len(p)  # doctest: +SKIP
    405120
    >>> 'numpy' in p and 'dol' in p
    True
    >>> 'no_way_this_is_a_package' in p
    False

The values of the mapping are the corresponding project's info, which is a
nested dict of good stuff.

    >>> info = p['numpy']
    >>> list(info)
    ['info', 'last_serial', 'releases', 'urls', 'vulnerabilities']

Tip: To only get the info you want, you'll

The project info is obtained, live, making requests to the
``https://pypi.python.org/pypi/{pkg_name}/json`` API,
but the list of all project names is actually taken from a local file.
You should update that file regularly (but not TOO regularly!) to be in sync
with pypi.org. To do so, do this:

    >>> Pypi.refresh_cached_package_names()  # doctest: +SKIP

If, on the other hand, you don't want all projects of Pypi to be the collection
you're working with, you can specify what ``user`` they should belong to:

    >>> p = Pypi(user='thorwhalen1')
    >>> len(p)  # doctest: +SKIP
    131

You can also explicitly give ``Pypi`` a collection of projects you want to work
with:

    >>> p = Pypi(proj_names={'numpy', 'pandas', 'dol'})
    >>> len(p)
    3

You can do a lot more by simply using the tools of ``dol`` to change the mapping
you want to work with in all kinds of ways!


            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/thorwhalen/yp",
    "name": "yp",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "",
    "author": "Thor Whalen",
    "author_email": "",
    "download_url": "https://files.pythonhosted.org/packages/1c/fd/36a099cdb2673a54379dfcd28af72ef4ecf6d412f55fc2971c80446ce8ff/yp-0.0.6.tar.gz",
    "platform": "any",
    "description": "# yp\n\nA mapping view to pypi projects\n\nTo install:\t```pip install yp```\n\nSee also: `pipoke`, for more pypi interaction tools.\n\n# Example Usage\n\nGet a mapping of all of ``pypi`` projects.\n\n    >>> from yp import Pypi\n    >>> p = Pypi()\n\nThe keys of this mapping are the project names. There are lots!\n\n    >>> len(p)  # doctest: +SKIP\n    405120\n    >>> 'numpy' in p and 'dol' in p\n    True\n    >>> 'no_way_this_is_a_package' in p\n    False\n\nThe values of the mapping are the corresponding project's info, which is a\nnested dict of good stuff.\n\n    >>> info = p['numpy']\n    >>> list(info)\n    ['info', 'last_serial', 'releases', 'urls', 'vulnerabilities']\n\nTip: To only get the info you want, you'll\n\nThe project info is obtained, live, making requests to the\n``https://pypi.python.org/pypi/{pkg_name}/json`` API,\nbut the list of all project names is actually taken from a local file.\nYou should update that file regularly (but not TOO regularly!) to be in sync\nwith pypi.org. To do so, do this:\n\n    >>> Pypi.refresh_cached_package_names()  # doctest: +SKIP\n\nIf, on the other hand, you don't want all projects of Pypi to be the collection\nyou're working with, you can specify what ``user`` they should belong to:\n\n    >>> p = Pypi(user='thorwhalen1')\n    >>> len(p)  # doctest: +SKIP\n    131\n\nYou can also explicitly give ``Pypi`` a collection of projects you want to work\nwith:\n\n    >>> p = Pypi(proj_names={'numpy', 'pandas', 'dol'})\n    >>> len(p)\n    3\n\nYou can do a lot more by simply using the tools of ``dol`` to change the mapping\nyou want to work with in all kinds of ways!\n\n",
    "bugtrack_url": null,
    "license": "apache-2.0",
    "summary": "A mapping view to pypi projects",
    "version": "0.0.6",
    "project_urls": {
        "Homepage": "https://github.com/thorwhalen/yp"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "d116c7d6c278723fcb2fc50d1ba8d81ada1fee88d8bfb278bc2c7b7c73497db5",
                "md5": "4ddd9a7fd4da81898b00dc8d5b503a57",
                "sha256": "3b5fa252507af90b800f82d5ffa51bb9336c050ecdfd4579ee49a505d2c4a0c8"
            },
            "downloads": -1,
            "filename": "yp-0.0.6-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "4ddd9a7fd4da81898b00dc8d5b503a57",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 9775,
            "upload_time": "2024-01-18T08:37:14",
            "upload_time_iso_8601": "2024-01-18T08:37:14.666535Z",
            "url": "https://files.pythonhosted.org/packages/d1/16/c7d6c278723fcb2fc50d1ba8d81ada1fee88d8bfb278bc2c7b7c73497db5/yp-0.0.6-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "1cfd36a099cdb2673a54379dfcd28af72ef4ecf6d412f55fc2971c80446ce8ff",
                "md5": "8ee0180a7b4fd6d1a2b4451c8b68fe54",
                "sha256": "929ca193ddffd3c53b806075c603ca9737ddeeab311a6bcbb62e6824f837ee63"
            },
            "downloads": -1,
            "filename": "yp-0.0.6.tar.gz",
            "has_sig": false,
            "md5_digest": "8ee0180a7b4fd6d1a2b4451c8b68fe54",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 8765,
            "upload_time": "2024-01-18T08:37:15",
            "upload_time_iso_8601": "2024-01-18T08:37:15.688757Z",
            "url": "https://files.pythonhosted.org/packages/1c/fd/36a099cdb2673a54379dfcd28af72ef4ecf6d412f55fc2971c80446ce8ff/yp-0.0.6.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-01-18 08:37:15",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "thorwhalen",
    "github_project": "yp",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "yp"
}
        
Elapsed time: 0.46064s