exjprop alternatives and similar packages
Based on the "Utilities" category.
Alternatively, view exjprop alternatives based on common mentions on social networks and blogs.
-
retry
Simple Elixir macros for linear retry, exponential backoff and wait with composable delays -
erlware_commons
Erlware Commons is an Erlware project focused on all aspects of reusable Erlang components. -
async_with
The asynchronous version of Elixir's "with", resolving the dependency graph and executing the clauses in the most performant way possible! -
plasm
Ecto's composable query multitool (.count, .random, .earliest, .latest, .find, .at, .on, etc.) -
sips_downloader
Utility to download Elixir Sips screencast videos written in Elixir (subscription to Elixir Sips required) -
ar2ecto
Migrate your active record migrations to ecto compatible migrations -
dot-notes
Simple dot/bracket notation parsing/conversion for Maps/Lists -
fitex
FitEx is a Macro-Module which provides a bit of sugar for function definitions. -
ex_progress
A library for tracking progress across many tasks and sub-tasks
Clean code begins in your IDE with SonarLint
Do you think we are missing an alternative of exjprop or a related project?
README
Exjprop
Exjprop is a library for reading Java properties files from various sources.
Implementations are provided for File, Stream, Function (which returns a stream), and Amazon S3.
API documentation is available at http://hexdocs.pm/exjprop
Add as dependency
{:exjprop, "~> 1.2"}
Load application properties at runtime
First, define a property loader module
defmodule MyApp.PropLoader do
use Exjprop.Loader
import Exjprop.Validators, only: [required: 1]
property "endpoint.secret", {:my_app, MyApp.Endpoint, :secret_key_base}
property "foo.bar", {:my_app, MyApp.Foo, :bar}, secret: false, pipeline: [&required/1]
property "foo.quux", {:my_app, MyApp.Foo, :quux}, secret: false, pipeline: [&required/1, &integer/1]
property "other_app.thing", {:other_app, :thing}, secret: false, pipeline: [&required/1, &integer/1]
end
Next, when your application starts, have it read in your properties and update your application environment
defmodule MyApp do
use Application
import Supervisor.Spec
alias MyApp.PropLoader
def start(_type, _args) do
PropLoader.load_and_update_env({:system, "MYAPP_PROPS_FILE"})
...
This configuration will cause the prop loader to read the MYAPP_PROPS_FILE
environment var, and attempt to use that as a uri for loading a properties file.
The uri should either file:///path/to/file.properties
or
s3:///myapp_bucket/path/to/s3/file.properties
.
Using S3 URLs
To enable support for retrieving property files from S3, a few additional dependencies are required.
{:ex_aws, "~> 2.1"},
{:sweet_xml, "~> 0.6"},
ExAws also needs an HTTP client - it defaults to Hackney, but can be modified (see https://hexdocs.pm/ex_aws/ExAws.Request.HttpClient.html)
JSON
Enable validators for json to keyword lists or maps
{:jason, "~> 1.1.2"},