Skip to main content

Flask extension that provides integration with Aerospike.

Project description

Flask-Aerospike

PyPI version CI Tests Documentation Status Maintainability Test Coverage PyPI - Downloads

Overview

Flask-Aerospike is a Flask extension that provides integration with the Aerospike database. It simplifies the process of connecting to and interacting with Aerospike from your Flask applications.

Installation

You can install Flask-Aerospike using pip:

pip install flask-aerospike

Usage

Here is a simple example of how to use Flask-Aerospike in your Flask application:

import aerospike
from flask import Flask
from flask_aerospike import FlaskAerospike

app = Flask(__name__)
app.config['FLASK_AEROSPIKE_CLIENT'] =  aerospike.client({'hosts': [('127.0.0.1', 3000)]}).connect()


ap = FlaskAerospike(app)

@app.route('/')
def index():
    client = ap.connection
    # Your Aerospike operations here
    return 'Hello, Aerospike!'

if __name__ == '__main__':
    app.run()

Configuration

You can configure Flask-Aerospike using the following configuration variables:

  • FLASK_AEROSPIKE_CLIENT: A list of tuples containing the host and port of your Aerospike nodes.
  • SESSION_AEROSPIKE_NAMESPACE: The namespace to use in Aerospike.
  • SESSION_AEROSPIKE_BIND_KEY: The set to use in Aerospike.

Documentation

The full documentation is available at Read the Docs.

Contributing

Contributions are welcome! Please read the contributing guidelines for more information.

License

This project is licensed under the MIT License. See the LICENSE file for details.

Credits

This project is maintained by:

  • Ido Shraga

See the AUTHORS.md file for a full list of contributors.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

flask_aerospike-0.0.1.tar.gz (11.1 kB view hashes)

Uploaded Source

Built Distribution

flask_aerospike-0.0.1-py3-none-any.whl (6.2 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page