Skip to main content

Minty HTTP Api server based on Pyramid

Project description

Pyramid configuration library Minty Python (micro)services.

Getting started


def hello(request):
  # See minty package for more information about these domain classes:
  domain_query_instance = request.get_query_instance("YourDomainHere")
  return domain_query_instance.some_domain_query()


def main(*args, **kwargs):
  # See minty package for more information about these domain classes:
  loader = minty_pyramid.Engine(domains=[YourDomainHere])

  # [optional] To retrieve session information, make sure  to add before
  # running loader.setup()
  kwargs["session_manager"] = True

  # Ensure the "get_query_instance" request method is available
  # It will use a CQRS instance, built with an InstanceConfig built from
  # the configuration file specified in the file pointed to by
  # "minty_service.infrastructure.config_file" in kwargs
  config = loader.setup(*args, **kwargs)

  config.add_route("hello_world", "/hello")
      hello, request_method="GET", renderer="json", route_name="hello_world"

  # If you've created the app from an openapi-spec file make sure to add:

  # Returns a WSGI application
  return loader.main()
Code generation commands:
generate-views: create boilerplate views by using “generate-views” command.

When creating your application from an openapi(v3) spec file run “generate-views” to create “” file with boilerplate code for all the views specified in the openapi spec.

see “generate-views –help” for more info

generate-routes: create Routes by using “generate-routes” command.

Generate or re-generate “” file from an openapi spec file.

see “generate-routes –help” for more info

More documentation

Please see the generated documentation via CI for more information about this module and how to contribute in our online documentation. Open index.html when you get there:


Please read for details on our code of conduct, and the process for submitting pull requests to us.


We use SemVer for versioning. For the versions available, see the tags on this repository


Copyright (c) 2018, Minty Team and all persons listed in CONTRIBUTORS

This project is licensed under the EUPL, v1.2. See the EUPL-1.2.txt file for details.

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 minty-pyramid, version 0.10.3
Filename, size File type Python version Upload date Hashes
Filename, size minty_pyramid-0.10.3-py3-none-any.whl (29.3 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size minty_pyramid-0.10.3.tar.gz (18.0 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page