Giter VIP home page Giter VIP logo

envy's Introduction

Envy Build Status Issues in Backlog

Envy is an environment variable manager for Racket applications.

  • Specify your environment variables in a declarative manifest, then use them as plain Racket variables.
  • Automatically fail with helpful error messages when required environment variables are not present.
  • Include types on your variables to automatically parse string values into Racket datatypes.

Envy supports plain Racket and Typed Racket out of the box; just install the envy package and go!

For information on how to get started, take a look at the documentation.

Credits

Name and functionality inspired by Envied for Ruby.

envy's People

Contributors

lexi-lambda avatar stamourv avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

stamourv

envy's Issues

#lang envy DSL

(First off, this is really cool and I've wanted something like this for a while)

It would be especially nice if there was a #lang envy:

#lang envy
aws-access-key-id
aws-secret-access-key
[foo-enabled? #:name "FOO_ENABLED" #:default #f]

Which would be equivalent to:

#lang typed/racket/base
(require envy)
(define/provide-environment
  aws-access-key-id
  aws-secret-access-key
  [foo-enabled? #:name "FOO_ENABLED" #:default #f]

And it would be even nicer if it used syntax that cooperated with sweet expressions:

#lang sweet-exp envy
aws-access-key-id
aws-secret-access-key
foo-enabled? #:name "FOO_ENABLED" #:default #f

Config hash?

Sometimes I'd like to do something reflectively over all bindings defined in a #lang envy module, like write them to a file, compute a signature of the current config, or store them in some global mutable data structure. It would be nice if #lang envy defined a hash table mapping symbols to the parsed env values.

Debugging and logging?

When debugging issues in complex apps I find it helpful to know exactly what configuration the app is in. Would it be a useful feature to have something like a #:debug or #:log flag that printed out messages on app startup about the configuration?

Custom type coercion function

It would be nice to have a custom coertion/parsing function beyond the generic type based ones. Something like:

(define/provide-environment [id #:coerse my-parse])

This would allow types beyond the default ones supported.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.