{"id":31250555,"url":"https://github.com/eiskrenkov/fino","last_synced_at":"2025-11-11T11:27:52.162Z","repository":{"id":313213446,"uuid":"1046445283","full_name":"eiskrenkov/fino","owner":"eiskrenkov","description":"Dynamic settings engine","archived":false,"fork":false,"pushed_at":"2025-09-19T12:12:17.000Z","size":241,"stargazers_count":29,"open_issues_count":4,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-09-21T04:57:43.861Z","etag":null,"topics":["engine","rails","redis","ruby"],"latest_commit_sha":null,"homepage":"https://fino.iskrenkov.me/fino","language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/eiskrenkov.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-08-28T17:42:25.000Z","updated_at":"2025-09-19T12:12:20.000Z","dependencies_parsed_at":"2025-09-04T16:30:02.762Z","dependency_job_id":"4f401011-cc2f-4ea7-adad-9c7fee214a30","html_url":"https://github.com/eiskrenkov/fino","commit_stats":null,"previous_names":["eiskrenkov/fino"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/eiskrenkov/fino","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eiskrenkov%2Ffino","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eiskrenkov%2Ffino/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eiskrenkov%2Ffino/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eiskrenkov%2Ffino/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/eiskrenkov","download_url":"https://codeload.github.com/eiskrenkov/fino/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eiskrenkov%2Ffino/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":276519117,"owners_count":25656554,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-23T02:00:09.130Z","response_time":73,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["engine","rails","redis","ruby"],"created_at":"2025-09-23T05:30:04.485Z","updated_at":"2025-11-11T11:27:52.155Z","avatar_url":"https://github.com/eiskrenkov.png","language":"HTML","readme":"# Fino\n\n⚠️ Fino in active development phase at wasn't properly battle tested in production just yet. Give us a star and stay tuned for Production test results and new features\n\nFino is a dynamic settings engine for Ruby and Rails\n\n## Usage\n\n### Define settings via DSL\n\n```ruby\nrequire \"fino-redis\"\n\nFino.configure do\n  adapter do\n    Fino::Redis::Adapter.new(\n      Redis.new(**Rails.application.config_for(:redis))\n    )\n  end\n\n  cache { Fino::Cache::Memory.new(expires_in: 3.seconds) }\n\n  settings do\n    setting :maintenance_mode, :boolean, default: false\n\n    setting :api_rate_limit,\n            :integer,\n            default: 1000,\n            description: \"Maximum API requests per minute per user to prevent abuse\"\n\n    section :openai, label: \"OpenAI\" do\n      setting :model,\n              :string,\n              default: \"gpt-5\",\n              description: \"OpenAI model\"\n\n      setting :temperature,\n              :float,\n              default: 0.7,\n              description: \"Model temperature\"\n    end\n\n    section :feature_toggles, label: \"Feature Toggles\" do\n      setting :new_ui, :boolean, default: true\n      setting :beta_functionality, :boolean, default: false\n    end\n\n    section :my_micro_service, label: \"My Micro Service\" do\n      setting :http_read_timeout, :integer, default: 200 # in ms\n      setting :http_open_timeout, :integer, default: 100 # in ms\n    end\n  end\nend\n```\n\n### Work with settings\n\n```ruby\nFino.value(:model, at: :openai) #=\u003e \"gpt-5\"\nFino.value(:temperature, at: :openai) #=\u003e 0.7\n\nFino.values(:model, :temperature, at: :openai) #=\u003e [\"gpt-4\", 0.7]\n\nFino.set(model: \"gpt-5\", at: :openai)\nFino.value(:model, at: :openai) #=\u003e \"gpt-5\"\n```\n\n### Overrides\n\n```ruby\nFino.value(:model, at: :openai) #=\u003e \"gpt-5\"\n\nFino.set(model: \"gpt-5\", at: :openai, overrides: { \"qa\" =\u003e \"our_local_model_not_to_pay_to_sam_altman\" })\n\nFino.value(:model, at: :openai) #=\u003e \"gpt-5\"\nFino.value(:model, at: :openai, for: \"qa\") #=\u003e \"our_local_model_not_to_pay_to_sam_altman\"\n```\n\n### A/B testing\n\n```ruby\nFino.value(:model, at: :openai) #=\u003e \"gpt-5\"\n\n# \"gpt-5\" becomes the control variant value and a 20.0% variant is created with value \"gpt-6\"\nFino.set(model: \"gpt-5\", at: :openai, variants: { 20.0 =\u003e \"gpt-6\" })\n\nFino.setting(:model, at: :openai).experiment.variant(for: \"user_1\") #=\u003e #\u003cFino::AbTesting::Variant percentage: 20.0, value: \"gpt-6\"\u003e\n\n# Picked variant is sticked to the user\nFino.value(:model, at: :openai, for: \"user_1\") #=\u003e \"gpt-6\"\nFino.value(:model, at: :openai, for: \"user_1\") #=\u003e \"gpt-6\"\n\nFino.value(:model, at: :openai, for: \"user_2\") #=\u003e \"gpt-5\"\n```\n\n## Rails integration\n\nFino easily integrates with Rails. Just add the gem to your Gemfile:\n\n```\ngem \"fino-rails\", require: false\n```\n\nto get built-in UI engine for your settings!\n\n### UI engine\n\nMount Fino Rails engine in your `config/routes.rb`:\n\n```ruby\nRails.application.routes.draw do\n  mount Fino::Rails::Engine, at: \"/fino\"\nend\n```\n\n### Configuration\n\n```ruby\nRails.application.configure do\n  config.fino.instrument = true\n  config.fino.log = true\n  config.fino.cache_within_request = false\n  config.fino.preload_before_request = true\nend\n```\n\n\u003cimg width=\"1493\" height=\"676\" alt=\"Screenshot 2025-09-19 at 13 09 06\" src=\"https://github.com/user-attachments/assets/19b6147a-e18c-41cf-aac7-99111efcc9d5\" /\u003e\n\n\u003cimg width=\"1775\" height=\"845\" alt=\"Screenshot 2025-09-19 at 13 09 33\" src=\"https://github.com/user-attachments/assets/c0010abd-285d-43d0-ae5d-ce0edb781309\" /\u003e\n\n## Performance tweaks\n\n1. In Memory cache\n\n   Fino provides in-memory settings caching functionality which will store settings received from adaper in memory for\n   a very quick access. As this kind of cache is not distributed between machines, but belongs to each process\n   separately, it's impossible to invalidate all at once, so be aware that setting update application time will depend\n   on cache TTL you configure\n\n   ```ruby\n   Fino.configure do\n     # ...\n     cache { Fino::Cache::Memory.new(expires_in: 3.seconds) }\n     # ...\n   end\n   ```\n\n2. Request scoped cache\n\n   When using Fino in Rails context it's possible to cache settings within request, in current thread storage. This is\n   safe way to cache settings as it's lifetime is limited, thus it is enabled by default\n\n   ```ruby\n   Rails.application.configure do\n     config.fino.cache_within_request = true\n   end\n   ```\n\n3. Preloading\n\n   In Rails context it is possible to tell Fino to preload multiple settings before processing request in a single\n   adapter call. Preloading is recommended for requests that use multiple different settings in their logic\n\n   ```ruby\n   # Preload all settings\n   Rails.application.configure do\n     config.fino.preload_before_request = true\n   end\n\n   # Preload specific subset of settings depending on request\n   Rails.application.configure do\n     config.fino.preload_before_request = -\u003e(request) {\n       case request.path\n       when \"request/using/all/settings\"\n         true\n       when \"request/not/using/settings\"\n         false\n       when \"request/using/specific/settings\"\n         [\n           :api_rate_limit,\n           openai: [:model, :temperature]\n         ]\n       end\n     }\n   end\n   ```\n\n## Releasing\n\n`rake release`\n\n## Contributing\n\n1. Fork it\n2. Do contribution\n6. Create Pull Request into this repo\n","funding_links":[],"categories":["Ruby"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feiskrenkov%2Ffino","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feiskrenkov%2Ffino","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feiskrenkov%2Ffino/lists"}