Skip to content

Conversation

@vilhelmprytz
Copy link
Member

@vilhelmprytz vilhelmprytz commented Sep 4, 2020

  • wilfred.errors is now wilfred.api.errors, wilfred.database is now wilfred.api.database

TODO:

  • Move functionality that is supposed to be in API to the API.
  • api: Implement all possible functions so that no operations require direct interaction to the database (e.g. server.create which currently requires the CLI to manually create a database object).
  • cli: Remove references to the database and only use the API

Fixes #60

* wilfred.errors is now wilfred.api.errors, wilfred.database is now wilfred.api.database
* introduced wilfred.api.servers "create" function, ability to create a new server without ever having to interact with the database
* introduced wilfred.api.servers "query" function, get a db object of server via API and not via database
* accidentally imported "environ" from os in previous commit, removed this
* added ability to override random_string() as id when creating a new server
* tests/test_server.py: now uses wilfred.api.servers.create to create server over adding db object to database directly
* forgot variable name, name=name.lower() and not just the argument name.lower()
@vilhelmprytz
Copy link
Member Author

This is quite out-of-date with master. I will check if the conflicts are solved easily, if not, I will just re-do the work I started here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Restructure and sanitize Wilfred API

2 participants