Coder Social home page Coder Social logo

brightsign-test's Introduction

brightsign-test

Hello, Thank you for the little test project. Here are instructions to build and run:

  • Clone the repo
  • bin/build
  • Define a shell variable LOCATEIP_API_KEY set to the value of your ipstack.com API key - export LOCATEIP_API_KEY=<key>
  • bin/locateip <ipaddress>

The program should output the latitude and longitude values, space-separated, to stdout on success and return 0. On any failure, a relevant error message should be output to stderr and the return value should be non-zero.

Dev builds: Reqs: python 3.10, pipenv (although the only 3rd party package in use is requests)

  • pipenv install
  • pipenv run python3 locateip.py <ipaddress>

Security considerations: The program currently expects the API key to be set in an environment variable, whose values is passed in via the docker run --env command line argument. A more robust method would be to use a proper secure store such as HashiCorp Vault or Mozilla SOPS and manage this as part of whatever larger set of secrets used in an enterprise environment. Beyond that, the api itself runs on http, which is a no-no. I also do have the docker build creating and using a user other than root.

brightsign-test's People

Contributors

stealthmuscles avatar

Watchers

James Cloos avatar  avatar

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.