This is a pre-production deployment of Warehouse, however changes made here WILL affect the production instance of PyPI.
Latest Version Dependencies status unknown Test status unknown Test coverage unknown
Project Description

# Bounce

It’s a keyword search engine, meaning you can configure it to redirect yt to Youtube, so a search like yt weird al would redirect right to Youtube’s search.

1 minute getting started

  1. Install it

    $ pip install bounce
    
  2. Start it:

    $ bounce-server
    
  3. Query it:

    $ curl "http://127.0.0.1:5000/?q=yt weird al"
    

You can also run it using any WSGI server like uWSGI using the included bouncefile.py as the wsgi-file.

Configuration

url configuration

Bounce has a built-in configuration file with generic mappings but you can also create your own that bounce will read when starting by setting the environment variable BOUNCE_CONFIG with a path to your custom configuration python file:

export BOUNCE_CONFIG=/path/to/bounce_config.py

The file must import bounce.core.commands:

from bounce.core import commands

The commands.add() method takes a space separated list of commands and a value:

commands.add("foo bar", "http://foo.com?q={}")

So, if you called bounce with the input:

foo blammo

It would redirect to:

http://foo.com?q=blammo

You could also call it with bar blammo and get the same thing because we set up the command keywords as foo bar so either foo or bar would redirect.

Notice that the value is a python format string.

callback configuration

value can also be a callback:

def callback(q):
    # manipulat q in some way and then return where you would like to go
    return 'http://some.url.that.needed.manipulated.q.com={}'.format(q)

commands.add("foo bar", callback)

That makes it so bounce can do all kinds of crazy things.

default configuration

By default, Google is the search engine of choice, so if you don’t start your request with a command, bounce will redirect to Google search with your search string. If you would like to change this just pass default=True to one of your custom commands:

commands.add("keyword", "value", default=True)

Viewing configuration

the command ls will list all the commands bounce supports

Testing

To test locally from the repo:

$ python bounce/bin/bounce-server

That should produce output like this:

* Running on http://127.0.0.1:5000/ (Press CTRL+C to quit)
* Restarting with stat
* Debugger is active!
* Debugger pin code: XXX-XXX-XXX

Which you can then use to test:

$ curl "http://127.0.0.1:5000/?q=..."

And that’s it.

Release History

Release History

0.1.4

This version

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.1.1

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.1

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

Download Files

Download Files

TODO: Brief introduction on what you do with files - including link to relevant help section.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
bounce-0.1.4.tar.gz (8.5 kB) Copy SHA256 Checksum SHA256 Source Mar 14, 2017

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting