Skip to content

Allow parser to accept files directly, not just the filepath #32

@tsloan1377

Description

@tsloan1377

Currently the Parser parse_file function accepts only a file path
parse_file(self, file_path, strict=True)
but it would be interesting to be able to pass data directly, to be compatible with a cloud storage service.

For some context, I am trying to use the package in a web application on GCS, but running into a fundamental issue I described on Stack Overflow.

Looking at the code, it appears it could work if we could pass gedcom_file as a data object directly to be parsed line by line with self.__parse_line, rather than requiring the file be loaded from disk using gedcom_file = open(file_path, 'rb')

But maybe there's another work-around I haven't thought of?

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions