Fetch and deploy external resource files
========================================
Sorry, this file is outdated – will be updated soon. Don't read on. Thank you.
Installation
------------
#. Install this package (as editable or from the repository) into your virtual environment.
#. Install ``invoke``,
create a ``tasks.py`` file in the root directory of your project and insert these lines::
from external_resources.tasks import (
get_resources,
check_resource,
deploy_resources,
)
#. Create a file ``external_resources.yaml`` containing information about the external
resources that you will be needing. An example is supplied with this package.
#. Create (or edit) the file ``invoke.yaml`` (in the same directory as ``tasks.py``);
it should specify the path of your ``external_resources.yaml`` registry and
a list of resource names and optional version specifiers (like in a requirements file).
Example::
external_resources:
required:
- bootstrap5
- bootstrap5_js
- htmx ~= 1.7
- lineawesome13 ~= 1.3
config_file: external_resources.yaml
dir_name: static_external
The path to the ``config_file`` can either be an absolute path or relative to the
directory of ``invoke.yaml``.
The ``dir_name`` option should point to a directory where the external resources
will be installed (on your local host); depending on the kind of the resource they
will go into subdirectories ``css``, ``js``, or ``fonts``.
#. The invoke command ::
inv get-resources
will try to download the resources specified as ``required`` into the ``dir_name``
target directory.
If the integrity check code for a resource is not known, the command ::
inv check-resource NAME
will calculate and display this code which then can be pasted into the registry
to make sure the correct file was retrieved on a later download.
With ::
inv deploy-resources
the resources from the local ``dir_name`` directory (and its subdirectories) will
be rsync'ed to the target host specified by the ``target`` option in ``invoke.yaml``.
Raw data
{
"_id": null,
"home_page": null,
"name": "external-resources",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.10",
"maintainer_email": "Detlef Lannert <detlef@lannert.de>",
"keywords": "css, fonts, installation, js, resources, web",
"author": null,
"author_email": "Detlef Lannert <detlef@lannert.de>",
"download_url": "https://files.pythonhosted.org/packages/98/bf/7ac2300d33ac442ae5fd45ebc554608fbb85a5bbf6364fa7b9769b780a0f/external_resources-0.2.0.tar.gz",
"platform": null,
"description": "Fetch and deploy external resource files\n========================================\n\nSorry, this file is outdated \u2013 will be updated soon. Don't read on. Thank you.\n\nInstallation\n------------\n\n#. Install this package (as editable or from the repository) into your virtual environment.\n\n#. Install ``invoke``,\n create a ``tasks.py`` file in the root directory of your project and insert these lines::\n\n from external_resources.tasks import (\n get_resources, \n check_resource,\n deploy_resources,\n )\n\n#. Create a file ``external_resources.yaml`` containing information about the external\n resources that you will be needing. An example is supplied with this package.\n\n#. Create (or edit) the file ``invoke.yaml`` (in the same directory as ``tasks.py``);\n it should specify the path of your ``external_resources.yaml`` registry and\n a list of resource names and optional version specifiers (like in a requirements file).\n \n Example::\n \n external_resources:\n required:\n - bootstrap5\n - bootstrap5_js\n - htmx ~= 1.7\n - lineawesome13 ~= 1.3\n config_file: external_resources.yaml\n dir_name: static_external\n\n The path to the ``config_file`` can either be an absolute path or relative to the\n directory of ``invoke.yaml``.\n \n The ``dir_name`` option should point to a directory where the external resources\n will be installed (on your local host); depending on the kind of the resource they\n will go into subdirectories ``css``, ``js``, or ``fonts``.\n\n#. The invoke command ::\n \n inv get-resources\n \n will try to download the resources specified as ``required`` into the ``dir_name``\n target directory.\n \n If the integrity check code for a resource is not known, the command ::\n \n inv check-resource NAME\n \n will calculate and display this code which then can be pasted into the registry\n to make sure the correct file was retrieved on a later download.\n \n With ::\n \n inv deploy-resources\n \n the resources from the local ``dir_name`` directory (and its subdirectories) will\n be rsync'ed to the target host specified by the ``target`` option in ``invoke.yaml``.\n",
"bugtrack_url": null,
"license": null,
"summary": "Fetch and deploy external resources (CSS, JS, Fonts) for web services",
"version": "0.2.0",
"project_urls": null,
"split_keywords": [
"css",
" fonts",
" installation",
" js",
" resources",
" web"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "75b42e12b947582dc9f4013c7c47b0cfbd0e00484ad4b0a392192b40a7fa406b",
"md5": "561a8edcb2d3aaf1c8d3d5e974234326",
"sha256": "3f0707c7ea6b466939a7d3b62e6777087e0255e6c6d3688e9852010fb60e0a6a"
},
"downloads": -1,
"filename": "external_resources-0.2.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "561a8edcb2d3aaf1c8d3d5e974234326",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.10",
"size": 22234,
"upload_time": "2024-10-16T00:12:31",
"upload_time_iso_8601": "2024-10-16T00:12:31.990026Z",
"url": "https://files.pythonhosted.org/packages/75/b4/2e12b947582dc9f4013c7c47b0cfbd0e00484ad4b0a392192b40a7fa406b/external_resources-0.2.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "98bf7ac2300d33ac442ae5fd45ebc554608fbb85a5bbf6364fa7b9769b780a0f",
"md5": "b300ad35bf49bc337bebbb20516c58b9",
"sha256": "152d7bc04b44970b79d0e188dde4ba3d12b0d5095162f8df0959a6961715f061"
},
"downloads": -1,
"filename": "external_resources-0.2.0.tar.gz",
"has_sig": false,
"md5_digest": "b300ad35bf49bc337bebbb20516c58b9",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.10",
"size": 20420,
"upload_time": "2024-10-16T00:12:33",
"upload_time_iso_8601": "2024-10-16T00:12:33.251761Z",
"url": "https://files.pythonhosted.org/packages/98/bf/7ac2300d33ac442ae5fd45ebc554608fbb85a5bbf6364fa7b9769b780a0f/external_resources-0.2.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-10-16 00:12:33",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "external-resources"
}