semvec/pypi-packages huggingface dataset:
biro 0.0.4
bidirectional URI routing
License: MIT
Keywords: bidirectional routing

# biro

bidirectional URI routing

```python
from biro import get, path_for, match

@get('/article')
def list_article():
    pass

@get('/article/<article_id>')
def show_article():
    pass

path_for(show_article, article_id=618)  # /article/618
path_for(list_article, limit=10)  # /article?limit=10

match('GET', "/article/309")  # (article, {"article_id": "309"})
match('POST', "/article/309")  # (None, None)
```

## the Router class

```python
from biro import Router

router = Router()
router.append('DETELE', '/article/<article_id>', handler)

router.match('PATCH', '/path')
router.path_for(handler, q=val)
```

## wsgi example

```python
from biro import get, match

@get('/')
def home():
    return 'home'

@get('/hello/<name>')
def hello(name):
    return 'hello %s' % name

def application(environ, start_response):
    handler, params = match(environ['REQUEST_METHOD'].upper(),
                            environ['PATH_INFO'])
    if handler:
        status = '200 OK'
        response = handler(**params)
    else:
        status = '404 Not Found'
        response = 'page not found'
    start_response(status, [('Content-Type', 'text/html; charset=utf-8')])
    return [response.encode('utf-8')]
```

save it as example.py, then it can be lunched using gunicorn like this:

```
$ gunicorn example:application
```
okdoc 0.0.3
Automatic documentation website, with style and lazyness
License: MIT

Okdoc
=====

> Automatic documentation website, with style and laziness


Write your documentation as markdown files, a tiny yaml configuration and just
fire up *okdoc* to build a beautiful website around it, ready to deploy on
heroku.


Installation
------------

`pip` will be here for the next commit, in the meantime let's build from source

```console
$ git clone https://github.com/hackliff/okdoc
$ cd okdoc && python setup.py install
$ # ...
$ okdoc --help
```


Rules for a compliant okdoc project
---------------------------------

* An `index.html.md` in the root directory. It will be the first page on the
  website

* Directories and files in `articles/` are sections and articles. A file or
  directory named `awesome-part` will become `Awesome Part`.

* A well informed `project.yml`, like below

```yaml
title: Intuition Lab
name: intuition
author: Xavier Bruhiere
keywords: finance, trading, quant
description: Automated quantitative trading kit, for hackers
copyright: 2014 Xavier Bruhiere

links:
  home: https://github.com/hackliff/intuition
  blog: http://hivetech.github.io
  about: www.google.com
  signup: https://app.wercker.com/users/new

contact:
  twitter: XavierBruhiere
  support_email: xavier.bruhiere@gmail.com

github:
  user: hackliff
  repo: intuition
```


Bam
---

```console
$ okdoc build --from /path/to/the/doc --to /where/you/want
```

You're done. Test it locally:

```console
$ cd /where/you/want
$ # Remove .ruby-version, or install ruby 2.0.0-p247
$ bundle install
$ bundle exec middleman build
$ bundle exec middleman server
$ # This is even ready for heroku
```


Credits
-------

Kudos to the [wercker team](wercker.com) who initially built and open sourced
their [devcenter](devcenter.wercker.com) website !
orbit 0.2
Gives current information about orbital objects of interest
License: MIT

===========
Orbit
===========

Orbit provides an easy way to get a number of values, such as current latitude and longitude, from objects in space. Currently, any object with a corresponding Two Line Element (TLE) can be tracked. A list of supported objects is available from Celestrack at <http://www.celestrak.com/NORAD/elements/master.asp>. Usage looks like:

    from orbit import satellite
    
    # 25544 is the idenfier for the International Space Station
    # See http://www.celestrak.com/NORAD/elements/master.asp for an index
    # of identifiers.
    
    iss = satellite(25544)
    
    # Get the current lat/long of the satellite
    iss_current_latitude = iss.lat()
    iss_current_longitude = iss.long()
    
    # Get the proper name of the satellite
    iss_name = iss.name()
    
    # Get the elsat classificiation of the satellite
    iss_elsat_classification = iss.elsat_classification()
    
    # Get the year the satellite launched
    iss_launch_year = iss.launch_year()
    
    # Get the current TLE for the satellite
    iss_tle = iss.tle()
    
    # Get the current elevation of the satellite
    iss_elevation = iss.elevation()
    
    # True if the satellite is currently in the earth's shadow
    iss_eclipsed = iss.eclipsed()