semvec/pypi-packages huggingface dataset:
pysitemap 0.5
A Python library for generating sitemap
License: BSD
Keywords: sitemap xml

PySitemap
=========

A Python library for generating a sitemap



Latest Version
--------------
The latest version of this project can be found at : http://github.com/vitalvas/pysitemap.


Installation
------------
* Option 1 : Install via pip ::

	pip install pysitemap

* Option 2 : If you have downloaded the source ::

	python setup.py install


Documentation
-------------
How to use? ::

	from pysitemap import SiteMap
	from datetime import datetime

	site = SiteMap()
	site.add(
		loc='http://example.com/webhp', 
		lastmod=datetime.now(), 
		changefreq='weekly')

	print site.to_string()


Reporting Bugs
--------------
Please report the bugs at github issue tracker.
https://github.com/vitalvas/pysitemap/issues


Author
------
VitalVas <source@vitalvas.com>
Vitaliy Vasilenko

* http://github.com/vitalvas
* http://www.vitalvas.com
dougrain-forms 0.2.0
Unofficial hypermedia form extension for dougrain.
License: BSD

==============
dougrain-forms
==============

.. image:: https://travis-ci.org/weluse/dougrain-forms.png?branch=master
    :target: https://travis-ci.org/weluse/dougrain-forms

A generator for hypermedia forms, following an unofficial draft by Mike Kelly.
The format is roughly based on
`this Gist <https://gist.github.com/mikekelly/3808215>`_ by `Mike Kelly`_.

.. _`Mike Kelly`: http://stateless.co/


Installation
============

::

    pip install dougrain-forms


Usage
=====

Example:

::

    from dougrain_forms import FormsMixin

    class FormsDocument(Document, FormsMixin):
        pass

    doc = FormsDocument.empty()
    doc.add_link('self', '/foo')

    doc.set_form(
        'attack',
        '/attacks',
        headers={
            'Content-Type': 'application/json'
        },
        method='POST',
        schema=ATTACK_SCHEMA
    )

    print(doc.as_object())

Output::

    {
        "_forms": {
            "attack": {
                "headers": {
                    "Content-Type": "application/json"
                },
                "href": "/attacks",
                "method": "POST",
                "schema": {
                    "required": [
                        "name",
                        "damage"
                    ],
                    "type": "object",
                    "properties": {
                        "name": {
                            "type": "string"
                        },
                        "damage": {
                            "minimum": 0,
                            "type": "integer",
                            "description": "How much does it hurt?"
                        }
                    },
                    "title": "Damage Schema"
                }
            }
        },
        "_links": {
            "self": {
                "href": "/foo"
            }
        }
    }


API
===

By mixing in ``FormMixin`` into your document, you get three new methods:

    * ``set_form(self, rel, target, **kwargs)``
    * ``delete_form(self, rel)``
    * ``form(self, href, **kwargs)``

Until real docs have been written, take a look at
`the source <https://github.com/weluse/dougrain-forms/blob/master/dougrain_forms/mixin.py>`_.