Skip to main content

A utility library that generates service name convention details based on a repo url.

Project description


gogo-utils is a utility library that generates a service name convention based on a repo url. The library is mainly used to ensure that an application is able to easily know the path to a service it may need.

from gogoutils import Parser, Generator

url = ''
project, repo = Parser(url).parse_url()

# a way to customize based on your conventions
my_formats = {
    'jenkins_job_name': '{project}-{repo}-master',
    'app': 'app-{project}{repo}',

info = Generator(project, repo, 'dev', formats=my_formats)

> {'name': 'gogoair-test-master'}

> app-gogoairtest



This class is needed to parse and gather details about a git repository. A url is split up and the result is a project, repo.


This class provides details about an application’s details when using different technologies. Its a simple and concise way to know how a specific app is referenced in jenkins, gitlab, s3, iam, dns and among other services tools.


This class provides a mechanism to alter the way Generator generates certain application references. It is mainly referenced within Generator to provide that functionality.

In setting up the format the following variables are exposed:

domain Domain
env Environment
project Git project/group name (lowercase)
raw_project Git project/group name
raw_repo Git repo name
repo Git repo name (lowercase)

These are the services you can customize the formats along with their default format:

apigateway_domain api.{env}.{domain} API gateway base domain
app {repo}{project} Application Name
dns_elb {repo}.{project}.{env}.{domain} FQDN of DNS ELB
dns_instance {repo}{project}-xx.{env}.{domain} FQDN of instances
domain Domain
git_repo_configs {raw_project}/{raw_repo}-config Config git repo
git_repo_qe {raw_project}/{raw_repo}-qa QA’s git repo
git_repo {raw_project}/{raw_repo} Apps git repo
iam_base {project}_{repo} IAM profile base
iam_group {project} IAM group name
iam_lambda_role {project}_{repo}_lambda_role Lambda IAM role name
iam_policy {project}_{repo}_policy IAM policy name
iam_profile {project}_{repo}_profile IAM profile name
iam_role {project}_{repo}_role IAM role name
iam_user {project}_{repo} IAM username
jenkins_job_name {project}_{repo} Jenkins job name
s3_app_bucket {project}-{repo} Application specific S3 bucket name
s3_archaius_name archaius-{env}/{project}/{repo}{project}/ S3 full path for archaius
s3_bucket_path {project}/{repo}{project} S3 path for app (within s3_bucket)
s3_bucket archaius-{env} S3 archaius bucket name


We encourage contributions, feedback and any bug fixes.

Running Tests

Running tests are very quick and easy when using tox. We validate against python 2.7, 3.4 and 3.5.

To run the tests simply execute

# only needed once
$ pip install -r requirements-dev.txt

$ tox

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for gogo-utils, version 1.7
Filename, size File type Python version Upload date Hashes
Filename, size gogo_utils-1.7-py2.py3-none-any.whl (9.0 kB) File type Wheel Python version 3.5 Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page