sheetwork init
The init
operation is a nice little helper that allows you to set up a new sheetwork
project with minimal effort. It takes care of setting up the following:
your project folder (along with the
sheetwork_project.yml
file and some useful defaults)your credentials files:
this means creating a
~/.sheetwork
folderplacing a
/google/<project_name>.json
in which you can write your google auth credentialsand creating a
profiles.yml
file where you can declare your profiles and database credentials.
Basically making the configuration steps a little bit easier to work with
Setting up a project from scratch
sheetwork init
can help you start a project entirely from scratch on your local machine and can be used as follows:
navigate to the folder in which you want to set up your project
cd /path/to_where_your_project_should_live
if you are using
sheetwork
in a virtual environment, don't forget to activate it firstsheetwork init --project-name my_awesome_sheetwork_project
If the init
operation completed successfully you should see the following:
As you can see from the instructions, you will have a few things to do such as:
set up the content of your
profiles.yml
files with your database credentials and google user service account.place your google auth credentials in the
/google/my_awesome_sheetwork_project.json
file that you obtained via the following steps
Setting up credentials only in case your sheetwork project was created manually or lives on a shared repository
In the case where you share a repo with someone else or an organisation, chances are the sheetwork project was already created and contains sheets in the sheets.yml
file or the project's folder. However, if you have never used sheetwork on your machine or never worked on that project you probably wont have the credentials files set up already.
In that case you will want to use the init
task with the flag --force-credentials-folders
otherwise init
will tell you that your project is already created and that nothing will happen.
navigate to the folder in which you want to set up your project
cd /path/to_where_your_project_should_live
If you run
sheetwork
in a virtual environment, make sure you activate it first.sheetwork init --project-name my_awesome_sheetwork_project --force-credentials-folders
If the init
operation ran successfully you should see the following message:
As you can see from the instructions, you will have a few things to do such as:
set up the content of your
profiles.yml
files with your database credentials and google user service account.place your google auth credentials in the
/google/my_awesome_sheetwork_project.json
file that you obtained via the following steps
Et voila! You're all set
Last updated