GithubHelp home page GithubHelp logo

lando / python Goto Github PK

View Code? Open in Web Editor NEW
2.0 5.0 2.0 1.1 MB

The Official Python Lando Plugin

Home Page: https://docs.lando.dev/python/

License: GNU General Public License v3.0

JavaScript 100.00%
lando lando-plugin python lando-service

python's Introduction

Python Lando Plugin

This is the official Lando plugin for Python. When installed it...

  • Allows users to run various python versions

Of course, once a user is running their Python project with Lando they can take advantage of all the other awesome development features Lando provides.

Basic Usage

Add a python service to your Landofile

services:
  myservice:
    type: python

For more info you should check out the docs:

Issues, Questions and Support

If you have a question or would like some community support we recommend you join us on Slack.

If you'd like to report a bug or submit a feature request then please use the issue queue in this repo.

Changelog

We try to log all changes big and small in both THE CHANGELOG and the release notes.

Maintainers

Contributors

Made with contributors-img.

Other Selected Resources

python's People

Contributors

dependabot[bot] avatar github-actions[bot] avatar larskhansen avatar pirog avatar reynoldsalec avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

Forkers

larskhansen

python's Issues

Unable to get Django up and running

---
name: django-play
services:
  appserver:
    type: python:3.11
    build:
      - pip install --upgrade pip
      - pip install -r requirements.txt
    scanner: true
    # NOTE: this entire Landofile hard codes a path to a project we assume exists. If you have a different
    # name for your project, you'll have to change all occurences of 'firstapp' to whatever your project is named.
    command: python /app/airlineclub/manage.py runserver 0:8800
    overrides:
      ports:
        - "8000:8000"
      environment:
        # NOTE: change this path to match your project name
        PYTHONPATH: "/app/airlineclub"
        DJANGO_SETTINGS_MODULE: "firstapp.settings"
    moreHttpPorts:
      - "8000"
  db:
    # NOTE: the credentials below are the default for Lando, don't bother trying to change them
    type: postgres:15
    portforward: true
    creds:
      user: postgres
      password:
      database: django-play

tooling:
  django-admin:
    service: appserver
    cmd: django-admin
  python:
    service: appserver
    cmd: python
  pip:
    service: appserver
    cmd: pip
  manage:
    service: appserver
    # NOTE: change this path to match your project name
    cmd: cd /app/airlineclub && python /app/airlineclub/manage.py
  psql:
    service: db
    cmd: psql -U postgres
  "db-import <file>":
    service: :host
    description: Imports a dump file into a database service
    cmd: /helpers/sql-import.sh
    options:
      host:
        description: The database service to use
        default: db
        alias:
          - h
      no-wipe:
        description: Do not destroy the existing database before an import
        boolean: true

results in:

appserver_1  | 2023-10-14T08:28:05.489931858Z lando 08:28:05.48 INFO  ==> Lando handing off to: /bin/sh -c python /app/airlineclub/manage.py runserver 0:8800
appserver_1  | 2023-10-14T08:28:05.508377347Z Traceback (most recent call last):
appserver_1  | 2023-10-14T08:28:05.508414138Z   File "/app/airlineclub/manage.py", line 10, in main
appserver_1  | 2023-10-14T08:28:05.508421998Z     from django.core.management import execute_from_command_line
appserver_1  | 2023-10-14T08:28:05.508428058Z ModuleNotFoundError: No module named 'django'
appserver_1  | 2023-10-14T08:28:05.508433998Z 
appserver_1  | 2023-10-14T08:28:05.508440028Z The above exception was the direct cause of the following exception:
appserver_1  | 2023-10-14T08:28:05.508445958Z 
appserver_1  | 2023-10-14T08:28:05.508451679Z Traceback (most recent call last):
appserver_1  | 2023-10-14T08:28:05.508461699Z   File "/app/airlineclub/manage.py", line 21, in <module>
appserver_1  | 2023-10-14T08:28:05.508468019Z     main()
appserver_1  | 2023-10-14T08:28:05.508473529Z   File "/app/airlineclub/manage.py", line 12, in main
appserver_1  | 2023-10-14T08:28:05.508495950Z     raise ImportError(
appserver_1  | 2023-10-14T08:28:05.508502380Z ImportError: Couldn't import Django. Are you sure it's installed and available on your PYTHONPATH environment variable? Did you forget to activate a virtual environment?

It appears that the build command isn't running before the command. What am I missing?

Lando rebuild, python 2.7 grammar.txt issue - drupal 9, php 8.1

Error: 2022-10-31 14:04:23,257 root INFO Generating grammar tables from /usr/lib/python2.7/lib2to3/Grammar.txt

at /snapshot/cli/lib/shell.js
From previous event:
at Shell.sh (/snapshot/cli/lib/shell.js)
at Object.dc (/snapshot/cli/lib/bootstrap.js)
at compose (/snapshot/cli/lib/bootstrap.js)
From previous event:
at /snapshot/cli/lib/router.js
at processImmediate (internal/timers.js:464:21)
From previous event:
at Object.run (/snapshot/cli/lib/router.js)
at run (/snapshot/cli/lib/engine.js)
at /snapshot/cli/lib/router.js
From previous event:
at Object.eventWrapper (/snapshot/cli/lib/router.js)
at Engine.engineCmd (/snapshot/cli/lib/engine.js)
at Engine.run (/snapshot/cli/lib/engine.js)
at /snapshot/cli/node_modules/@lando/platformsh/app.js
at processImmediate (internal/timers.js:464:21)
From previous event:
at /snapshot/cli/node_modules/@lando/platformsh/app.js
From previous event:
at AsyncEvents. (/snapshot/cli/node_modules/@lando/platformsh/app.js)
at AsyncEvents.handle (/snapshot/cli/lib/events.js)
at /snapshot/cli/lib/events.js
From previous event:
at AsyncEvents.emit (/snapshot/cli/lib/events.js)
From previous event:
at App.start (/snapshot/cli/lib/app.js)
at /snapshot/cli/lib/app.js
From previous event:
at App.restart (/snapshot/cli/lib/app.js)
at Object.run (/snapshot/cli/plugins/lando-core/tasks/restart.js)
From previous event:
at /snapshot/cli/lib/cli.js
From previous event:
at Object.handler (/snapshot/cli/lib/cli.js)
at Object.runCommand (/snapshot/cli/node_modules/yargs/lib/command.js:238:44)
at Object.parseArgs [as _parseArgs] (/snapshot/cli/node_modules/yargs/yargs.js:1063:30)
at Function.get [as argv] (/snapshot/cli/node_modules/yargs/yargs.js:1004:21)
at Cli.init (/snapshot/cli/lib/cli.js)
at Cli.run (/snapshot/cli/lib/cli.js)
at Object. (/snapshot/cli/bin/lando.js)
at Module._compile (pkg/prelude/bootstrap.js:1794:22)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1114:10)
at Module.load (internal/modules/cjs/loader.js:950:32)
at Function.Module._load (internal/modules/cjs/loader.js:790:12)
at Function.runMain (pkg/prelude/bootstrap.js:1847:12)
at internal/main/run_main_module.js:17:47

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.