switchboard


Nameswitchboard JSON
Version 1.6.5 PyPI version JSON
download
home_pagehttps://github.com/switchboardpy/switchboard/
SummaryFeature flipper for Pyramid, Pylons, or TurboGears apps.
upload_time2023-10-18 16:33:19
maintainer
docs_urlNone
authorKyle Adams
requires_python>=3.8
licenseApache License
keywords switches feature flipper pyramid pylons turbogears
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            [![Build Status](https://github.com/switchboardpy/switchboard/actions/workflows/main.yml/badge.svg)](https://github.com/switchboardpy/switchboard/actions/workflows/main.yml)
[![Code Coverage](https://codecov.io/gh/switchboardpy/switchboard/branch/master/graph/badge.svg)](https://codecov.io/gh/switchboardpy/switchboard)


Switchboard
===========

Switchboard is a Python WSGI app that makes it easy to [toggle
features](https://en.wikipedia.org/wiki/Feature_toggle) in
a variety of Python web frameworks. Created to enable
[A/B](https://www.optimizely.com/optimization-glossary/ab-testing/) and [user
testing](https://www.experienceux.co.uk/faqs/what-is-usability-testing/)
at [SourceForge](https://sourceforge.net/), it features an easy-to-use admin
dashboard with powerful conditions for activating a particular feature.

![Admin Dashboard](./docs/screenshots/switchboard-overview.png)

What follows is an abbreviated version of [Switchboard's full
documentation](http://switchboard.readthedocs.io/).

## Getting Started

Want to use Switchboard in your application? Keep reading. Interested in
developing on Switchboard or running a small example locally? Take a
look at the [Development](#development) section.

### Installing

Install Switchboard and its dependencies using pip:

```
pip install switchboard
```

### Setup

Next, embed Switchboard and its admin UI within the application.
Framework-specific details can be found in [Switchboard's
documentation](http://switchboard.readthedocs.io/en/stable/user-documentation.html#installation).

### Using Switches

Switchboard's basic unit is a switch. Every switch has a unique key
associated with it and is either active (on) or inactive (off), so using
it in code is simple:

```
>>> from switchboard import operator
>>> operator.is_active('foo')
False
```

In this case we checked to see if the "foo" switch was active. By
default, Switchboard will auto-create any switches that don't already
exist, such as "foo". Auto-created switches default to an inactive
state. This just scratches the surface; [there's so much more that a switch can
do](http://switchboard.readthedocs.io/en/stable/user-documentation.html#using-switches).

## Development

These instructions cover setting Switchboard up locally for development and
testing purposes. See [Getting Started](#getting-started) for notes on how to
use Switchboard within a web application.

### Prerequisites

* Virtualenv: `$ sudo easy_install virtualenv`

### Bootstrapping

1. Make a virtualenv workspace: `$ virtualenv --no-site-packages .venv`
1. Activate the virtualenv:     `$ source .venv/bin/activate`
1. Install all dependencies:    `$ make install`

### Running the Example App

Switchboard includes an
[example](https://github.com/switchboardpy/switchboard/blob/master/example/server.py)
application, which is handy both for doing development and for taking it for a
test drive in a very simple environment. It also provides an example of
setting Switchboard up to run within a
[Bottle](https://www.fullstackpython.com/bottle.html)-based application.

To run:

```
$ make example
```

At this point a very simple application is now running at
`http://localhost:8080` and the admin UI is accessible at
`http://localhost:8080/_switchboard/`. The application has one switch
(`example`) and outputs text that tells you whether the switch is active.

### Running Tests

Switchboard includes both unit tests and functional tests of the admin
dashboard, using the example application.

To run the unit tests:

```
$ make test
```

The functional test requires both an updated
[Firefox](https://www.mozilla.org/en-US/firefox/new/) and
[geckodriver](https://github.com/mozilla/geckodriver):

```
$ npm install -g geckodriver
```

To run the functional tests:

```
$ make functional-test
```

### Releasing

To distribute a new release of Switchboard:

1. Update the version in `setup.py`, following [Semantic
   Versioning](http://semver.org).
1. Cut the release:
```
$ make release
```

### Versioning

We use [Semantic Versioning](http://semver.org/) for versioning. For the
versions available, see the [tags on this
repository](https://github.com/switchboardpy/switchboard/tags).


## Contributing

Please read [CONTRIBUTING.md](CONTRIBUTING.md) for details on our code of
conduct, and the process for submitting pull requests to us.

## Authors

* **Kyle Adams** - *Initial work* - [kadams54](https://github.com/kadams54)

See also the list of
[contributors](https://github.com/switchboardpy/switchboard/contributors) who
participated in this project.

## License

This project is licensed under the Apache License - see the [LICENSE](LICENSE)
file for details.

## Acknowledgments

Switchboard began life as a port of [Disqus'](https://disqus.github.io/)
[Gargoyle](https://github.com/disqus/gargoyle), a feature flipper
for [Django](https://www.djangoproject.com/).
[David Cramer's](https://twitter.com/zeeg) [Pycon](https://us.pycon.org/2018/)
lightning talk on Gargoyle had me drooling for that same feature flipping fun in
non-Django apps.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/switchboardpy/switchboard/",
    "name": "switchboard",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": "",
    "keywords": "switches feature flipper pyramid pylons turbogears",
    "author": "Kyle Adams",
    "author_email": "kadams54@users.noreply.github.com",
    "download_url": "https://files.pythonhosted.org/packages/1f/33/33b1debccd95db8139da77c6e7589509b0b7f355a26455ab8c79f5c4d419/switchboard-1.6.5.tar.gz",
    "platform": null,
    "description": "[![Build Status](https://github.com/switchboardpy/switchboard/actions/workflows/main.yml/badge.svg)](https://github.com/switchboardpy/switchboard/actions/workflows/main.yml)\n[![Code Coverage](https://codecov.io/gh/switchboardpy/switchboard/branch/master/graph/badge.svg)](https://codecov.io/gh/switchboardpy/switchboard)\n\n\nSwitchboard\n===========\n\nSwitchboard is a Python WSGI app that makes it easy to [toggle\nfeatures](https://en.wikipedia.org/wiki/Feature_toggle) in\na variety of Python web frameworks. Created to enable\n[A/B](https://www.optimizely.com/optimization-glossary/ab-testing/) and [user\ntesting](https://www.experienceux.co.uk/faqs/what-is-usability-testing/)\nat [SourceForge](https://sourceforge.net/), it features an easy-to-use admin\ndashboard with powerful conditions for activating a particular feature.\n\n![Admin Dashboard](./docs/screenshots/switchboard-overview.png)\n\nWhat follows is an abbreviated version of [Switchboard's full\ndocumentation](http://switchboard.readthedocs.io/).\n\n## Getting Started\n\nWant to use Switchboard in your application? Keep reading. Interested in\ndeveloping on Switchboard or running a small example locally? Take a\nlook at the [Development](#development) section.\n\n### Installing\n\nInstall Switchboard and its dependencies using pip:\n\n```\npip install switchboard\n```\n\n### Setup\n\nNext, embed Switchboard and its admin UI within the application.\nFramework-specific details can be found in [Switchboard's\ndocumentation](http://switchboard.readthedocs.io/en/stable/user-documentation.html#installation).\n\n### Using Switches\n\nSwitchboard's basic unit is a switch. Every switch has a unique key\nassociated with it and is either active (on) or inactive (off), so using\nit in code is simple:\n\n```\n>>> from switchboard import operator\n>>> operator.is_active('foo')\nFalse\n```\n\nIn this case we checked to see if the \"foo\" switch was active. By\ndefault, Switchboard will auto-create any switches that don't already\nexist, such as \"foo\". Auto-created switches default to an inactive\nstate. This just scratches the surface; [there's so much more that a switch can\ndo](http://switchboard.readthedocs.io/en/stable/user-documentation.html#using-switches).\n\n## Development\n\nThese instructions cover setting Switchboard up locally for development and\ntesting purposes. See [Getting Started](#getting-started) for notes on how to\nuse Switchboard within a web application.\n\n### Prerequisites\n\n* Virtualenv: `$ sudo easy_install virtualenv`\n\n### Bootstrapping\n\n1. Make a virtualenv workspace: `$ virtualenv --no-site-packages .venv`\n1. Activate the virtualenv:     `$ source .venv/bin/activate`\n1. Install all dependencies:    `$ make install`\n\n### Running the Example App\n\nSwitchboard includes an\n[example](https://github.com/switchboardpy/switchboard/blob/master/example/server.py)\napplication, which is handy both for doing development and for taking it for a\ntest drive in a very simple environment. It also provides an example of\nsetting Switchboard up to run within a\n[Bottle](https://www.fullstackpython.com/bottle.html)-based application.\n\nTo run:\n\n```\n$ make example\n```\n\nAt this point a very simple application is now running at\n`http://localhost:8080` and the admin UI is accessible at\n`http://localhost:8080/_switchboard/`. The application has one switch\n(`example`) and outputs text that tells you whether the switch is active.\n\n### Running Tests\n\nSwitchboard includes both unit tests and functional tests of the admin\ndashboard, using the example application.\n\nTo run the unit tests:\n\n```\n$ make test\n```\n\nThe functional test requires both an updated\n[Firefox](https://www.mozilla.org/en-US/firefox/new/) and\n[geckodriver](https://github.com/mozilla/geckodriver):\n\n```\n$ npm install -g geckodriver\n```\n\nTo run the functional tests:\n\n```\n$ make functional-test\n```\n\n### Releasing\n\nTo distribute a new release of Switchboard:\n\n1. Update the version in `setup.py`, following [Semantic\n   Versioning](http://semver.org).\n1. Cut the release:\n```\n$ make release\n```\n\n### Versioning\n\nWe use [Semantic Versioning](http://semver.org/) for versioning. For the\nversions available, see the [tags on this\nrepository](https://github.com/switchboardpy/switchboard/tags).\n\n\n## Contributing\n\nPlease read [CONTRIBUTING.md](CONTRIBUTING.md) for details on our code of\nconduct, and the process for submitting pull requests to us.\n\n## Authors\n\n* **Kyle Adams** - *Initial work* - [kadams54](https://github.com/kadams54)\n\nSee also the list of\n[contributors](https://github.com/switchboardpy/switchboard/contributors) who\nparticipated in this project.\n\n## License\n\nThis project is licensed under the Apache License - see the [LICENSE](LICENSE)\nfile for details.\n\n## Acknowledgments\n\nSwitchboard began life as a port of [Disqus'](https://disqus.github.io/)\n[Gargoyle](https://github.com/disqus/gargoyle), a feature flipper\nfor [Django](https://www.djangoproject.com/).\n[David Cramer's](https://twitter.com/zeeg) [Pycon](https://us.pycon.org/2018/)\nlightning talk on Gargoyle had me drooling for that same feature flipping fun in\nnon-Django apps.\n",
    "bugtrack_url": null,
    "license": "Apache License",
    "summary": "Feature flipper for Pyramid, Pylons, or TurboGears apps.",
    "version": "1.6.5",
    "project_urls": {
        "Download": "https://github.com/switchboardpy/switchboard/releases",
        "Homepage": "https://github.com/switchboardpy/switchboard/"
    },
    "split_keywords": [
        "switches",
        "feature",
        "flipper",
        "pyramid",
        "pylons",
        "turbogears"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "64baf1693ae7a945a944cd37dd61b9a2de8ece90e16902facf2bc0b3d017b2e6",
                "md5": "7b62220de28ad160bf9e2cfc347eb389",
                "sha256": "233ea8000531cc3e125ac3c22b77a46e5205aa7db98223c61fbbfae339475f86"
            },
            "downloads": -1,
            "filename": "switchboard-1.6.5-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "7b62220de28ad160bf9e2cfc347eb389",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 59555,
            "upload_time": "2023-10-18T16:33:18",
            "upload_time_iso_8601": "2023-10-18T16:33:18.337083Z",
            "url": "https://files.pythonhosted.org/packages/64/ba/f1693ae7a945a944cd37dd61b9a2de8ece90e16902facf2bc0b3d017b2e6/switchboard-1.6.5-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "1f3333b1debccd95db8139da77c6e7589509b0b7f355a26455ab8c79f5c4d419",
                "md5": "332852374f8f00594c8e11bef568bf48",
                "sha256": "440f9363886233f79a1a6af2bb91899e9379fc0508fb7a230a6ee388b2770fdb"
            },
            "downloads": -1,
            "filename": "switchboard-1.6.5.tar.gz",
            "has_sig": false,
            "md5_digest": "332852374f8f00594c8e11bef568bf48",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 51967,
            "upload_time": "2023-10-18T16:33:19",
            "upload_time_iso_8601": "2023-10-18T16:33:19.949237Z",
            "url": "https://files.pythonhosted.org/packages/1f/33/33b1debccd95db8139da77c6e7589509b0b7f355a26455ab8c79f5c4d419/switchboard-1.6.5.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-10-18 16:33:19",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "switchboardpy",
    "github_project": "switchboard",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [],
    "tox": true,
    "lcname": "switchboard"
}
        
Elapsed time: 0.13228s