Giter VIP home page Giter VIP logo

pyramidvue's Introduction

Pyramid Webframework with Vuejs & Webpack (HMR thanks to Thijs Damsma)

Features

  1. Pyramid Webframework
  2. Vue2
  3. Node.js
  4. Webpack3
  5. Babel
  6. Yarn [packet manager]

Getting Started

First clone

git clone https://github.com/eddyekofo94/pyramidVue.git

First create a virtual environment, otherwise by default python instance available will be used (I recomend the former).

make venv
# or if you have virtualenv installed
virtualenv -p python3 ./env

Make sure you activate your virtual environment!!

source env/bin/activate

Development environment setup

These steps will install all required dependencies, then run the server.

# download all the required requirements for development
make dev
# test your project
make test
# run your project
# Go to: localhost:6543 (webpack-dev-server runs on localhost:8080)
make run

Errors encountered

# Don't have the webpack-dev-server installed
/bin/sh: webpack-dev-server: command not found

# Fix:
yarn global add webpack-dev-server
### Deployment
```bash
# make sure the webpack-dev-server setting in production.ini is not set to true
make build

External links

http://docs.pylonsproject.org/projects/pyramid/en/latest/index.html

https://vuejs.org

https://webpack.js.org

pyramidvue's People

Contributors

dependabot[bot] avatar eddyekofo94 avatar tdamsma avatar timgates42 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

pyramidvue's Issues

Running the code shows errors

When I run make dev , I get the errors:

Running setup.py bdist_wheel for coverage ... error
  Complete output from command /home/cdit/gnukhata/pyramidVue/env/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-2fveho8t/coverage/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d /tmp/pip-wheel-m54c1ap7 --python-tag cp37:
  usage: -c [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
     or: -c --help [cmd1 cmd2 ...]
     or: -c --help-commands
     or: -c cmd --help
  
  error: invalid command 'bdist_wheel'
  
  ----------------------------------------
  Failed building wheel for coverage
  Running setup.py clean for coverage
  Running setup.py bdist_wheel for Mako ... error
  Complete output from command /home/cdit/gnukhata/pyramidVue/env/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-2fveho8t/Mako/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d /tmp/pip-wheel-rfgmiaq4 --python-tag cp37:
  usage: -c [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
     or: -c --help [cmd1 cmd2 ...]
     or: -c --help-commands
     or: -c cmd --help
  
  error: invalid command 'bdist_wheel'
  
  ----------------------------------------
  Failed building wheel for Mako
  Running setup.py clean for Mako
  Running setup.py bdist_wheel for MarkupSafe ... error
  Complete output from command /home/cdit/gnukhata/pyramidVue/env/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-2fveho8t/MarkupSafe/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d /tmp/pip-wheel-8t913c4o --python-tag cp37:
  /tmp/pip-install-2fveho8t/MarkupSafe/setup.py:20: DeprecationWarning: Flags not at the start of the expression '^__version__\\s+=\\s+(' (truncated)
    '^__version__\s+=\s+(.*?)$(?sm)', f.read()).group(1))
  /tmp/pip-install-2fveho8t/MarkupSafe/setup.py:27: DistDeprecationWarning: Features are deprecated and will be removed in a future version. See https://github.com/pypa/setuptools/issues/65.
    Extension('markupsafe._speedups', ['markupsafe/_speedups.c']),
  /usr/lib/python3.7/distutils/core.py:108: DistDeprecationWarning: Features are deprecated and will be removed in a future version. See https://github.com/pypa/setuptools/issues/65.
    _setup_distribution = dist = klass(attrs)
  usage: -c [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
     or: -c --help [cmd1 cmd2 ...]
     or: -c --help-commands
     or: -c cmd --help
  
  error: invalid command 'bdist_wheel'
  
  ----------------------------------------
  Failed building wheel for MarkupSafe
  Running setup.py clean for MarkupSafe
  Running setup.py bdist_wheel for pyramid-mako ... error
  Complete output from command /home/cdit/gnukhata/pyramidVue/env/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-2fveho8t/pyramid-mako/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d /tmp/pip-wheel-debfhz6f --python-tag cp37:
  usage: -c [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
     or: -c --help [cmd1 cmd2 ...]
     or: -c --help-commands
     or: -c cmd --help
  
  error: invalid command 'bdist_wheel'
  
  ----------------------------------------
  Failed building wheel for pyramid-mako
  Running setup.py clean for pyramid-mako
  Running setup.py bdist_wheel for repoze.lru ... error
  Complete output from command /home/cdit/gnukhata/pyramidVue/env/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-2fveho8t/repoze.lru/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d /tmp/pip-wheel-94q0ntz4 --python-tag cp37:
  usage: -c [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
     or: -c --help [cmd1 cmd2 ...]
     or: -c --help-commands
     or: -c cmd --help
  
  error: invalid command 'bdist_wheel'
  
  ----------------------------------------
  Failed building wheel for repoze.lru
  Running setup.py clean for repoze.lru
  Running setup.py bdist_wheel for zope.interface ... error
  Complete output from command /home/cdit/gnukhata/pyramidVue/env/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-2fveho8t/zope.interface/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d /tmp/pip-wheel-1g5gofil --python-tag cp37:
  /tmp/pip-install-2fveho8t/zope.interface/setup.py:70: DistDeprecationWarning: Features are deprecated and will be removed in a future version. See https://github.com/pypa/setuptools/issues/65.
    [os.path.normcase(codeoptimization_c)]
  /usr/lib/python3.7/distutils/core.py:108: DistDeprecationWarning: Features are deprecated and will be removed in a future version. See https://github.com/pypa/setuptools/issues/65.
    _setup_distribution = dist = klass(attrs)
  usage: -c [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
     or: -c --help [cmd1 cmd2 ...]
     or: -c --help-commands
     or: -c cmd --help
  
  error: invalid command 'bdist_wheel'
  
  ----------------------------------------
  Failed building wheel for zope.interface

and

reading manifest template 'MANIFEST.in'
warning: no files found matching '*.cfg'
warning: no files found matching '*.rst'
warning: no files found matching '*.ico' under directory 'pyramidvue'
warning: no files found matching '*.gif' under directory 'pyramidvue'
warning: no files found matching '*.jpg' under directory 'pyramidvue'
warning: no files found matching '*.pt' under directory 'pyramidvue'
warning: no files found matching '*.txt' under directory 'pyramidvue'
warning: no files found matching '*.mak' under directory 'pyramidvue'
warning: no files found matching '*.mako' under directory 'pyramidvue'
warning: no files found matching '*.xml' under directory 'pyramidvue'
warning: no files found matching '*.jinja2' under directory 'pyramidvue'

when I run make run I get the following error:

source ./env/bin/activate; \

/bin/sh: 1: source: not found
make: *** [Makefile:31: run] Error 127

Prepare demo for Python Bytes podcast

@eddyekofo94, I just contacted @mikeckennedy to see if this is something for his Python Bytes podcast, and he replied:

Would you be willing to put in a little summary, documentation, and make the sample more than a blank page when you run it? I'm asking because I'd be happy to consider making it a featured item on the show but I'm not sure it's ready for people to take and work from.

Ideally, this would be most excellent as a cookiecutter template (you could copy from the Pyramid ones and adapt).

So what do you think, are you familiar with cookiecutter templates? I can give it a go if you are interested

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.