Metadata-Version: 2.1
Name: evo-featureflags-server
Version: 1.24.3
Summary: Feature flags server
Author-Email: "d.zakharchuk" <d.zakharchuk@smartweb.com.ua>, "m.kindritskiy" <m.kindritskiy@smartweb.com.ua>, Vladimir Magamedov <vladimir@magamedov.com>
License: MIT
Project-URL: Documentation, https://featureflags.readthedocs.io/en/latest/
Project-URL: Repository, https://github.com/evo-company/featureflags
Project-URL: Homepage, https://github.com/evo-company/featureflags
Requires-Python: >=3.11
Requires-Dist: grpclib==0.4.6
Requires-Dist: hiku==0.7.5
Requires-Dist: protobuf<4.0.0
Requires-Dist: sqlalchemy[mypy]==1.4.42
Requires-Dist: aiopg[sa]==1.4.0
Requires-Dist: psycopg2==2.9.7
Requires-Dist: graphql-core==3.2.3
Requires-Dist: prometheus-client==0.17.1
Requires-Dist: alembic==1.12.0
Requires-Dist: metricslog==0.1.3
Requires-Dist: pyyaml==6.0.1
Requires-Dist: pyjwt==2.8.0
Requires-Dist: ldap3==2.9.1
Requires-Dist: pydantic>=2.3.0
Requires-Dist: pydantic-settings>=2.0.3
Requires-Dist: setuptools==68.2.2
Requires-Dist: fastapi>=0.103.2
Requires-Dist: orjson>=3.9.8
Requires-Dist: uvloop>=0.17.0
Requires-Dist: httptools>=0.6.0
Requires-Dist: uvicorn[standart]>=0.23.2
Requires-Dist: typer>=0.9.0
Requires-Dist: jinja2>=3.1.2
Requires-Dist: dependency-injector>=4.41.0
Requires-Dist: grpcio>=1.59.0
Requires-Dist: prometheus-fastapi-instrumentator>=6.1.0
Provides-Extra: sentry
Requires-Dist: sentry-sdk[fastapi,grpcio]>=1.40.5; extra == "sentry"
Description-Content-Type: text/x-rst

FeatureFlags service
====================

|project|_ |documentation|_ |version|_ |tag|_ |license|_

FeatureFlags is a client/server solution for feature flags integration

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

Server
~~~~~~

.. code-block:: shell

  $ pip3 install evo-featureflags-server


Client
~~~~~~

* Python - https://github.com/evo-company/featureflags-py
* JavaScript - https://github.com/evo-company/featureflags-js

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

Read documentation_


Development
-----------

Run all this commands:

- ``lets postgres``
- ``lets apply-migrations-dev``
- ``lets apply-seeds-dev``  if you have data in ``seeds/`` directory
- ``lets web`` in separate terminal
- ``lets ui`` in separate terminal, this will start vite dev server

.. note:: You might need to install npm dependencies: ``cd ui && npm install``

- `http://localhost:8080` - web application with `lets ui`
- `http://localhost:3001` - web application with `lets ui-build-dev`
- `http://localhost:8081` - http api
- `localhost:50051` - grpc api

To create a project for development purposes you can run:

``lets http``

and then execute this command:

.. code-block:: shell

    curl -X POST http://localhost:8080/flags/load -H "Content-Type: application/json" \
    -d '{"project": "test", "version": 1, "variables": [{"name": "user.id", "type": 2}], "flags": ["TEST_FLAG"], "values": [["TEST_VALUE", 1]]}'

Default username is ``admin`` and password is ``admin`` if you run with `configs/local.yaml` configuration file (default)

To start API handlers (not required for web application):

- ``lets http`` in separate terminal (this will start http server on ``http://localhost:8080``)
- ``lets rpc`` in separate terminal (this will start grpc server on ``localhost:50051``)

To build UI and copy it to ``web/static`` directory:

- ``lets ui-build-dev``

To release package:

- ``lets release 1.0.0 --message="Added feature"``

Pre-commit

``./scripts/enable-hooks.sh``

``./scripts/disable-hooks.sh``


Architecture
------------

Check important architecture decisions in ``adr/`` directory.


.. |project| image:: https://img.shields.io/badge/evo-company%2Ffeatureflags-blueviolet.svg?logo=github
.. _project: https://github.com/evo-company/featureflags
.. |documentation| image:: https://img.shields.io/badge/docs-featureflags.rtfd.io-blue.svg
.. _documentation: https://featureflags.readthedocs.io/en/latest/
.. |version| image:: https://img.shields.io/pypi/v/evo-featureflags-server.svg?label=stable&color=green
.. _version: https://pypi.org/project/featureflags/
.. |tag| image:: https://img.shields.io/github/tag/evo-company/featureflags.svg?label=latest
.. _tag: https://pypi.org/project/evo-featureflags-server/#history
.. |license| image:: https://img.shields.io/pypi/l/featureflags.svg
.. _license: https://github.com/evo-company/featureflags/blob/master/LICENSE.txt

