Skip to main content
Macros
=====

Version 0.0.1.


Macros is a collection of Hy macros. It will be developed
further to provide further convenience. It is on a very early stage.
DO NOT USE IN PRODUCTION.

install with

.. code-block:: sh

pip install git+git://github.com/Hylands/macros.git

for the very latest version, or


.. code-block:: sh

pip install macros

for the more stable version.

Then use the macros in hy using

.. code-block:: hy

(require macros.flask)
(require macros.flow)
and then use the route macro.


.. code-block:: hy

(route "/" "home.html")
(route "/" (defn womethods [] ("hello, world")))
(route "/" ["GET" "POST"] (defn wmethods [] ("hello, world")))
(route "/" ["GET" "POST"] "templatewmethods.html")
(route "/<name>/<address>" "template.html" [name] [[address "N/A"]])

The syntax is for a template:

.. code-block:: hy

(route *route-endpoint* [*possibly a list of methods*] *template* [*required args*] [*optional args*])

where *optional args* can be of the form [arg1 arg2] for the default value of None
or [[arg1 42] arg2] where arg1 would have the default value of 42, but arg2 would have the default value of None.

Metadata

Release files for macros 0.0.1

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

Source distribution (sdist)

Source distribution for macros 0.0.1
File Size Uploaded
macros-0.0.1.tar.gz 1.8 kB Details

Release files / macros-0.0.1.tar.gz

Download URL macros-0.0.1.tar.gz
Size 1.8 kB
Tags Source
SHA-256 checksum
How to use checksums
04d2c7b614ce2ae401764ab37b1faa507dce26e3295bd93a679402864228218a
BLAKE2b-256 checksum
How to use checksums
29e06f48cec5972bf3e034823859c877830b611f9e48ddc7e10132fa393302e2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

0.0.1 This release

1 release file

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