dryxPyramid ∞
basic, reusable code for pyramid webapps.
Documentation for dryxPyramid is hosted by Read the Docs (development version and master version). The code lives on github. Please report any issues you find here.
Features ∞
Installation ∞
The easiest way to install dryxPyramid is to use pip
(here we show the install inside of a conda environment):
conda create -n dryxPyramid python=3.7 pip
conda activate dryxPyramid
pip install dryxPyramid
Or you can clone the github repo and install from a local version of the code:
git clone git@github.com:thespacedoctor/dryxPyramid.git
cd dryxPyramid
python setup.py install
To upgrade to the latest version of dryxPyramid use the command:
pip install dryxPyramid --upgrade
To check installation was successful run dryxPyramid -v
. This should return the version number of the install.
Development ∞
If you want to tinker with the code, then install in development mode. This means you can modify the code from your cloned repo:
git clone git@github.com:thespacedoctor/dryxPyramid.git
cd dryxPyramid
python setup.py develop
Pull requests are welcomed!
Initialisation ∞
Before using dryxPyramid you need to use the init
command to generate a user settings file. Running the following creates a yaml settings file in your home folder under ~/.config/dryxPyramid/dryxPyramid.yaml
:
dryxPyramid init
The file is initially populated with dryxPyramid’s default settings which can be adjusted to your preference.
If at any point the user settings file becomes corrupted or you just want to start afresh, simply trash the dryxPyramid.yaml
file and rerun dryxPyramid init
.
Modifying the Settings ∞
Once created, open the settings file in any text editor and make any modifications needed.
Basic Python Setup ∞
If you plan to use dryxPyramid
in your own scripts you will first need to parse your settings file and set up logging etc. One quick way to do this is to use the fundamentals
package to give you a logger, a settings dictionary and a database connection (if connection details given in settings file):
## SOME BASIC SETUP FOR LOGGING, SETTINGS ETC
from fundamentals import tools
from os.path import expanduser
home = expanduser("~")
settingsFile = home + "/.config/dryxPyramid/dryxPyramid.yaml"
su = tools(
arguments={"settingsFile": settingsFile},
docString=__doc__,
)
arguments, settings, log, dbConn = su.setup()
Todo List ∞
Todo
nice!
(The original entry is located in /home/docs/checkouts/readthedocs.org/user_builds/dryxpyramid/checkouts/master/docs/source/_template_.md, line 1.)
Release Notes ∞
v0.4.2 - December 11, 2020
FIXED - doc dependencies
v0.4.1 - June 24, 2020
enhancements - added some tweaks for the python 3 version of webapps
v0.4.0 - May 25, 2020
Now compatible with Python 3.*
API Reference ∞
Modules ∞
The base model for other model modules to build on top of |
|
Classes ∞
A superclass model for pyramid apps |
|
The CSV renderer - can return plain text in browser or a file to download |
|
The json renderer - can return content to browser or a file to download |
|
The plain_table renderer - can return content to browser or a file to download |
|
The plain_text renderer - can return content to browser or a file to download |
|
The worker class for the templates_download module |
|
The worker class for the templates_login module |
|
The base view that can be used for any API resource |
|
A-Z Index ∞
Modules
The base model for other model modules to build on top of |
|
Classes
A superclass model for pyramid apps |
|
The CSV renderer - can return plain text in browser or a file to download |
|
The json renderer - can return content to browser or a file to download |
|
The plain_table renderer - can return content to browser or a file to download |
|
The plain_text renderer - can return content to browser or a file to download |
|
The worker class for the templates_download module |
|
The worker class for the templates_login module |
|
The base view that can be used for any API resource |
|
Functions
Get the users and groups from the database |
|
*If the userid exists in the system, it will return a sequence of group identifiers (or an empty sequence if the user isn’t a member of any groups). |
|
Release Notes ∞
v0.4.2 - December 11, 2020
FIXED - doc dependencies
v0.4.1 - June 24, 2020
enhancements - added some tweaks for the python 3 version of webapps
v0.4.0 - May 25, 2020
Now compatible with Python 3.*