![PyPI Now Supports iOS and Android Wheels for Mobile Python Development](https://cdn.sanity.io/images/cgdhsj6q/production/96416c872705517a6a65ad9646ce3e7caef623a0-1024x1024.webp?w=400&fit=max&auto=format)
Security News
PyPI Now Supports iOS and Android Wheels for Mobile Python Development
PyPI now supports iOS and Android wheels, making it easier for Python developers to distribute mobile packages.
github.com/gravitational/configure
configure
is a golang library that populates a struct from environment variables, command line arguments and YAML files.
It works by reading a struct definition with special tags.
The latest can be seen if you run:
godoc github.com/gravitational/configure
But here's a quickstart: Define a sample structure, for example:
type Config struct {
StringVar string `env:"STRING_VAR" cli:"string-var" yaml:"string_var"`
BoolVar bool `env:"BOOL_VAR" cli:"bool_var" yaml:"bool_var"`
IntVar int `env:"INT_VAR" cli:"int_var" yaml:"int_var"`
HexVar hexType `env:"HEX_VAR" cli:"hex_var" yaml:"hex_var"`
MapVar map[string]string `env:"MAP_VAR" cli:"map_var" yaml:"map_var,flow"`
SliceMapVar []map[string]string `env:"SLICE_MAP_VAR" cli:"slice_var" yaml:"slice_var,flow"`
}
Then you can query the environment and populate that structure from environment variables, YAML files or command line arguments.
import (
"os"
"github.com/gravitational/configure"
)
func main() {
var cfg Config
// parse environment variables
err := configure.ParseEnv(&cfg)
// parse YAML
err = configure.ParseYAML(&cfg)
// parse command line arguments
err = configure.ParseCommandLine(&cfg, os.Args[1:])
}
FAQs
Unknown package
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
PyPI now supports iOS and Android wheels, making it easier for Python developers to distribute mobile packages.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.