fetchcode-0.2.0
توضیحات
fetchcode is a library to reliably fetch code via HTTP, FTP and version control systems.
| ویژگی | مقدار |
|---|---|
| سیستم عامل | - |
| نام فایل | fetchcode-0.2.0 |
| نام | fetchcode |
| نسخه کتابخانه | 0.2.0 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | nexB. Inc. and others |
| ایمیل نویسنده | info@aboutcode.org |
| آدرس صفحه اصلی | https://github.com/nexB/fetchcode |
| آدرس اینترنتی | https://pypi.org/project/fetchcode/ |
| مجوز | Apache-2.0 |
FetchCode: Utilities to fetch code from purls, URLs and version control repos.
================================================================================
FetchCode is a library to reliably fetch code via HTTP, FTP and version control
systems. It can work using plain HTTP and FTP URLs, as well as
`Package URLs <https://github.com/package-url>`_ and version control (VCS) URLs
as used in Python pip and as specified in `SPDX Package Download Location
<https://spdx.github.io/spdx-spec/3-package-information/#37-package-download-location>`_
Homepage and support: https://github.com/nexB/fetchcode
Why FetchCode?
--------------
It is surprisingly difficult to have a simple API to consistently fetch code
from package repositories, version control repositories and APIs: each site
and each package manager has its own unique and peculiar ways. FetchCode goal
is to abstract all these details and make it easy to fetch things reliably.
Development installation
--------------------------
Clone the repo::
git clone https://github.com/nexB/fetchcode
Then install all the requirements using::
configure --dev
Running tests
----------------
To run test suite use::
pytest -vvs
Usage
--------
Fetch a code archive and get a ``fetchcode.fetch.Reposnse`` object back::
>>> from fetchcode import fetch
>>> f = fetch('https://github.com/nexB/fetchcode/archive/ab65b2e645c889887227ea49eb3332d885fd0a54.zip')
>>> f.location
'/tmp/tmp_cm02xsg'
>>> f.content_type
'application/zip'
>>> f.url
'https://github.com/nexB/fetchcode/archive/ab65b2e645c889887227ea49eb3332d885fd0a54.zip'
Fetch some package metadata and get a ``fetchcode.packagedcode_models.Package`` object back::
>>> from fetchcode import package
>>> list(package.info('pkg:rubygems/files'))
[Package(type='rubygems', namespace=None, name='files', version=None)]
License
--------
- SPDX-License-Identifier: Apache-2.0
Copyright (c) nexB Inc. and others.
نیازمندی
| مقدار | نام |
|---|---|
| - | attrs |
| - | packageurl-python |
| - | requests |
| >=3.3.1 | Sphinx |
| >=0.5.0 | sphinx-rtd-theme |
| >=0.8.1 | doc8 |
| !=7.0.0,>=6 | pytest |
| >=2 | pytest-xdist |
| >=6.0.0 | aboutcode-toolkit |
| - | black |
زبان مورد نیاز
| مقدار | نام |
|---|---|
| >=3.6.* | Python |
نحوه نصب
نصب پکیج whl fetchcode-0.2.0:
pip install fetchcode-0.2.0.whl
نصب پکیج tar.gz fetchcode-0.2.0:
pip install fetchcode-0.2.0.tar.gz