Brainstorm: Folders as APIs (FAP-EYES)
FAP-EYES is not the most commercially viable name, but the concept underlying it is very promising.
I've come up with the concept for project files to have "attributes", but I didn't have any ideas for how folders could have "attributes". To recap you, what are file attributes?
Recap: file attributes
File attributes are basic flags that can be applied to files which tell YDP that "this file does something special", and allow a bunch of functionality to be automatically inherited by that file. I plan to offer a nice blend between abstract attributes, as well as specific attributes which developers often commonly use. For example, below are a couple of attributes I've brainstormed:
- Dataset creator - a file which produces a dataset, which can then be globally imported elsewhere.
- Common - a file which is to be accessible from other projects, and easily invokable without worry about dependencies or Python version.
- Transformation - a file which transforms something. I've developed this idea less, but I transform data a lot. One implementation idea for this is to have a "original" dataset, with "transformations" like sub-versions of a dataset which may work on deltas (like "stores with addresses" transformed into the subversion "stores with addresses and latlongs").
(Whether they are in the first release is undecided.)
So, what are examples of folder attributes?
The first idea I've had for this is to flag a subsequent filesystem as an API. The thought arose from an idea in the back of my head to implement different but similar to NextJS's routing system (extremely cool) for Python somehow. For example:
/api/jack.py
def main():
return "Hello!"
Would be accessible at https://ydp.ydp/your-username/your-project-name/102512132/jack or https://ydp.ydp/102512132/jack. Don't take these URLs as any reflection of what this feature would look like in reality, as it's just for demo's sake.
I understand and respect the common define-your-routes method, and I've used it a lot over my career, but for some reason the NextJS routing system was just so easy to understand quick to develop with, I think it'll be a real help.
Comments
Post a Comment
What did you think about this post? Do you have any ideas you think would be helpful?