semvec/pypi-packages huggingface dataset:
glass-web 0.0.7
A library for building web applications
Requires Python: >=3.7

Glass is a mini WSGI routing library for building web applications.
It comes with bultin template engine. It is micro-framework because it comes with limited tools for web development. But it is extensible.

Glass  comes with builtin development server.

## Installation

 Install from pypi;

```bash

  $ pip istall glass-web

```

or upgrade to latest release ;

```bash
 $ pi install --upgrade glass-web

```
or clone from github;

```bash

  $ git clone https://github.com/horlarwumhe/glass.git
  $ cd glass
  $ pip install -r requirements.txt
  $ python setup.py install


```
##  Example

```py

  from glass import GlassApp

  app = GlassApp()
  @app.route('/')
  def home():
    return 'Hello, welcome.'

  @app.route('/greet/<name>')
  def greet(name):
      return 'Hello {}'.format(name)

  app.run()
  #app.run(host='127.0.0.1',port=8000,debug=True,auto_reload=True)

```

## Using Template

Glass template syntax is very similar to django template.


```html
  # index.html
  <html>
  <title> {% block title %} Blog {% endblock %}</title>
  <body>
    {% block content %}
       {% for post in posts %}
        <h3> {{post.title}} </h3>
        Author: <b> {{post.author}}
        <a href='{{post.url}}'> read more </a>
        {% endfor %}
       {% endblock %}
   </body>


```

```py

from glass import GlassApp
from glass import render_template,render_string
from glass import request,redirect

app = GlassApp()
@app.route('/')
def home():
  posts = get_all_posts()
  return render_template('index.html',posts=posts)

@app.route('/greet/<name>')
def greet(name):
  template = '''
  Hello {{name}}, welcome to {{request.host}}
  '''
  return render_string(template,name=name)

@app.route('/login',methods=["GET",'POST'])
def login():
  if request.method == 'POST':
    name = request.post.get('username')
    password = request.post.get('password')
    do_login(name,password)
    return redirect('/')
  else:
    return render_template('login.html')


app.run()

``` 
## Documentation
Documentation is available on [glass site](http://glass.horlarwumhe.me). It is also available on [readthedocs](https://glassapp.readthedocs.io).
iterstring 1.2.0
Simple class that allows writing lists and dicts as heredoc strings

==========
iterstring
==========


.. image:: https://img.shields.io/pypi/v/iterstring.svg
        :target: https://pypi.python.org/pypi/iterstring

.. image:: https://img.shields.io/travis/datagazing/iterstring.svg
        :target: https://travis-ci.com/datagazing/iterstring

.. image:: https://readthedocs.org/projects/iterstring/badge/?version=latest
        :target: https://iterstring.readthedocs.io/en/latest/?version=latest
        :alt: Documentation Status


Simple class that allows writing lists and dicts as heredoc strings

* Write lists as strings with one line per element
* Same for dictionaries, but use first token on each line as key

Features
--------

* Handles comments (using # characters)
* Strips away extraneous whitespace with reasonable defaults (configurable)
* Coerce items to numbers where possible (see coerce)
* Iterating over the object treats it like a list
* Indexing the object treats it like a dictionary
* listr and distr helper functions provide simple interfaces

Examples
--------

A simple use case:

.. code-block:: python

  >>> from iterstring import listr # or distr
  >>> some_list = listr('''
  item one # with a comment
    2
  three
  ''')
  >>> some_list
  ['item one', 2, 'three']
  >>> type(some_list)
  <class 'list'>

Using the class directly:

.. code-block:: python

  >>> from iterstring import Istr
  >>> asdf = Istr('''
  item one # with a comment
    2
  three
  ''')
  >>> asdf.to_list()
  ['item one', 2, 'three']
  >>> type(asdf)
  <class 'iterstring.Istr'>

  >>> [x for x in asdf]
  ['item one', 2, 'three']

  >>> fdsa = Istr('''
  item one # with a comment
    2 some other value
  key3 3.14159
  ''')
  >>> asdf.to_dict()
  {'item': 'one', 2: 'some other value', 'key3': 3.14159}
  >>> asdf.to_dict(coerce=False)
  {'item': 'one', '2': 'some other value', 'key3': '3.14159'}

License
-------

* Free software: MIT license

Documentation
-------------

* https://iterstring.readthedocs.io/

Credits
-------

This package was created with Cookiecutter_ and the `audreyr/cookiecutter-pypackage`_ project template.

.. _Cookiecutter: https://github.com/audreyr/cookiecutter
.. _`audreyr/cookiecutter-pypackage`: https://github.com/audreyr/cookiecutter-pypackage