Week 06 / 2023
Quickstart
edgedb project initpython -m pip install -r requirements.txtedgedb -I qna_app_1 migration createedgedb -I qna_app_1 migration apply
Pytest
- Pytest provides the
parametrizefor multiple parameters of the same purpose. (Like multiple valid/invalid foo inputs).
Activitypub
Memray
appins
pyenv install 3.10.10pyenv virtualenv 3.10.10 [env-name]pyenv local [env-name]python -m pip install appinsappins initappins get-app git@github.com:enabledu/qna_app.git
Pipx
- pipx is made specifically for application installation, as it adds isolation yet still makes the apps available in your shell
- pipx creates an isolated environment for each application and its associated packages.
- This guarantees no dependency conflicts and clean uninstalls!
- globally install an application by running
pipx install appins, makes theappinscommand available globally, but sandboxes theappinspackage in its own virtual environment. pipx run, This can be handy when you need to run the latest version of an app, but don't necessarily want it installed on your computer.- what is
shims/?
Adoptting edgedb
cli.tomledgedb dump, backup an edgedb database to a file. vs.edgedb restore, restore an edgedb database from a backup file.- By default they will look in dbschema directory, but it’s also possible to specify any other location by using schema-dir
- It’s also possible to split the schema definition across multiple .esdl files. The migration tools will read all of them and treat them as a single SDL document. (What about multiple dirs?)
- EdgeQL, SDL, DDL
- data definition language (DDL) commands that manipulate the database’s schema.
Shrtcuts
ctrl + ato go to the beginning of the line you are currently typing on.ctrl + kto clear the line after the cursor (cut).ctr + yto paste what you just cut.
Pyenv
- The pyenv global command simply reads the data in your
~/.pyenv/versiondirectory. This file contains the name of the version of Python that you want to use globally. pyenv global []only changes a single line in a text file!