告别Word,用Python打造你的专业简历!

今天给大家介绍下一个在纯 python 中构建简历的实用工具,工具的连接地址github.com/koek67/resum

用法介绍

要求

Python 3.7 或更高版本(仅此而已!)

安装

整个库是一个单独的 python 文件 resume_builder.py。下载此文件

用法

要生成简历,只需要执行:python resume.py--out resume.html如果想要转换为 PDF,请在 web 浏览器中打开上一步输出的 html 文件,打印为 PDF。生成的简历已针对 PDF 进行了优化。在浏览器中,您可以放大/缩小 PDF,使其更好地适应页面。

简历定义

简历是在resume.py这个 Python 文件中定义的。这些文件提供了如何配置简历的最佳示例。有关更多详细信息,请参阅resume_builder.pyreference.md

简历结构

  • 简历包括:
    • 联系人信息
    • 一些章节列表(如工作经历、教育经历)
  • 联系人信息包括:
    • name(你的名字)
    • 详细信息(一些字符串列表,比如电子邮件、地址等)
  • 每个章节包括:
    • 标题(如教育经历)
    • 一些章节内容的列表(如教育经历的详细)
  • 章节内容包括:
    • 标题(粗体大文本)
    • 标题(括号中的文字)
    • 日期:字符串类型描述日期
    • 详细描述:

原始示例

简历定义

# Koushik Krishnan's Resume

from resume_builder import Resume, Section, SectionEntry, ContactInfo, ConcatText, ItalicsText, UnderlinedText, LinkText, BulletedList

resume = Resume(
    contact_info=ContactInfo(
        name="Koushik Krishnan",
        details=[
            "(111) 111-1111",
            "[email protected]",
            LinkText("koushik.bearblog.dev", "https://koushik.bearblog.dev"),
            LinkText(
                "linkedin.com/in/koushikkrishnan",
                "https://www.linkedin.com/in/koushikkrishnan/",
            ),
            LinkText("github.com/koek67", "https://www.github.com/koek67"),
        ],
        tag_line="Making software as reliable as the sunrise.",
    ),
    sections = [
        Section(
            title="Experience",
            entries=[
                SectionEntry(
                    title=LinkText("Microsoft", "https://www.microsoft.com"),
                    caption="Senior Software Engineer",
                    location="Remote",
                    dates="February 2023 - present",
                    description=BulletedList(
                        [
                            "Building reliability improvements into the storage and replication layers of Cosmos DB.",
                            "Technical lead for a team of engineers, ramping them up on distributed systems and database concepts as well as preparing them for incident response.",
                        ]
                    ),
                ),
                SectionEntry(
                    title=LinkText("Yugabyte", "https://www.yugabyte.com"),
                    caption="Senior Site Reliability Engineer",
                    location="Seattle, Washington",
                    dates="May 2022 - February 2023",
                    description=BulletedList(
                        [
                            "Managed reliable operation of Kubernetes and Yugabyte database clusters across AWS and GCP for the Yugabyte Managed product."
                        ]
                    ),
                ),
                SectionEntry(
                    title=LinkText("Microsoft", "https://www.microsoft.com"),
                    caption="Software Engineer 2, Azure Cosmos DB",
                    location="Redmond, Washington",
                    dates="August 2018 - April 2022",
                    description=BulletedList(
                        [
                            "Worked as a technical lead for a petabyte-scale, globally distributed database. Reduced number of production incidents by 80%.",
                            'Founded a team that built a Python microservice that would perform real-time root cause analysis/mitigation of incidents and eliminate the need for an on-call engineer. Open sourced this work on Github as <a class="open-link" target="_blank" href="http://github.com/microsoft/jupyrest">Jupyrest</a>',
                        ]
                    ),
                ),
                SectionEntry(
                    title=LinkText("Microsoft", "https://www.microsoft.com"),
                    caption="Software Engineering Intern, Azure Cosmos DB",
                    location="Seattle, Washington",
                    dates="May 2017 - August 2017",
                ),
                SectionEntry(
                    title=LinkText("Fitbit", "https://fitbit.com"),
                    caption="Software Engineering Intern",
                    location="Boston, Massachusetts",
                    dates="May 2016 - August 2016",
                ),
                SectionEntry(
                    title=LinkText("Kayak.com", "https://www.kayak.com"),
                    caption="Software Engineering Intern",
                    location="Concord, Massachusetts",
                    dates="May 2015 - August 2015",
                )
            ],
        ),
        Section(
            title="Presentations",
            entries=[
                SectionEntry(
                    title=LinkText(
                        text="PyCon 2024",
                        url="https://us.pycon.org/2024/schedule/presentation/95/",
                        show_icon=True,
                    ),
                    caption="Rest East with Jupyrest: Deploy notebooks as web services",
                    location="Pittsburgh, PA",
                    dates="May 2024",
                ),
                SectionEntry(
                    title=LinkText(
                        text="PyTexas",
                        url="https://www.pytexas.org/2024/schedule/talks/#rest-easy-with-jupyrest-deploy-notebooks-as-web-services",
                        show_icon=True,
                    ),
                    caption="Rest East with Jupyrest",
                    location="Austin, TX",
                    dates="April 2024",
                ),
                SectionEntry(
                    title=LinkText(
                        text="PyCascades",
                        url="https://2024.pycascades.com/program/talks/jupyrest/",
                        show_icon=True,
                    ),
                    caption="Rest East with Jupyrest: Deploy notebooks as web services",
                    location="Seattle, WA",
                    dates="April 2024",
                ),
                SectionEntry(
                    title=LinkText(
                        text="PyOhio 2023",
                        url="https://www.pyohio.org/2023/speakers/koushik-krishnan/",
                        show_icon=True,
                    ),
                    caption=LinkText('Serverless Jupyter Notebook Functions (YouTube)', url="https://youtu.be/hoGJ0c3jIeo?si=srbRtjSxOxETFWN5", show_icon=True),
                    location="Virtual",
                    dates="December 2023",
                ),
                SectionEntry(
                    title=LinkText(
                        text="PyData Seattle 2023",
                        url="https://seattle2023.pydata.org/cfp/talk/K8KV8M/",
                        show_icon=True,
                    ),
                    caption=LinkText('Notebooks as Serverless Functions (YouTube)', url="https://youtu.be/hoGJ0c3jIeo?si=srbRtjSxOxETFWN5", show_icon=True),
                    location="Seattle, WA",
                    dates="April 2023",
                ),
            ],
        ),
        Section(
            title="Volunteering",
            entries=[
                SectionEntry(
                    title=LinkText(
                        "ASHA Chennai", url="https://chennai.ashanet.org/", show_icon=True
                    ),
                    caption="Spoken English Teacher",
                    location="Remote",
                    dates="December 2020 - March 2022",
                    description=BulletedList(
                        [
                            "Created a curriculum with story-telling, skits, and friendly debates to provide disadvantaged children isolated in quarantine a fun way to learn spoken English.",
                        ]
                    ),
                )
            ],
        ),
        Section(
            title="Education",
            entries=[
                SectionEntry(
                    title="Georgia Institute of Technology",
                    location="Atlanta, Georgia",
                    dates="August 2014 - May 2018",
                    description=ItalicsText(
                        "Bachelors of Science in Computer Science and Mathematics"
                    ),
                )
            ],
        ),
        Section(
            title="Skills",
            entries=[
                SectionEntry(
                    description=BulletedList(
                        [
                            ConcatText(
                                UnderlinedText("Languages:"),
                                " Python, Golang, C/C++, JavaScript, C#, Powershell, Zig",
                            ),
                            ConcatText(
                                UnderlinedText("Tools:"),
                                " Kubernetes, PostgreSQL, Linux, Windows, Azure Service Fabric, Distributed Databases, Storage Engines, Docker",
                            ),
                        ]
                    )
                ),
            ],
        ),
    ]
)

if __name__ == "__main__":
    resume.cli_main()

结果预览

 

中文简历定义

针对国人的情况,给出了一个中文模板

简历定义

# 十月狐狸的简历

from resume_builder import Resume, Section, SectionEntry, ContactInfo, ConcatText, ItalicsText, UnderlinedText, LinkText, BulletedList

resume = Resume(
    contact_info=ContactInfo(
        name="十月狐狸",
        details=[
            "134 1234 4321",
            "[email protected]",
            LinkText("博客园", "https://www.cnblogs.com/sesshoumaru/"),
            LinkText("github", "https://github.com/Sesshoumaru"),
        ],
        tag_line="总要有所坚持...",
    ),
    sections = [
        Section(
            title="工作经历",
            entries=[
                SectionEntry(
                    title=LinkText("微软中国", "https://www.microsoft.com"),
                    caption="高级开发工程师",
                    location="上海",
                    dates="2023年1月 - 至今",
                    description=BulletedList(
                        [
                            "负责xx系统的数据库的增删改代码的实现",
                            "作为一个工程师团队的技术负责人,带领团队做了很多不怎么牛逼的事情",
                        ]
                    ),
                ),
                SectionEntry(
                    title=LinkText("腾讯", "https://www.qq.com"),
                    caption="高级开发工程师",
                    location="深圳",
                    dates="2022年5月 - 2023年1月",
                    description=BulletedList(
                        [
                            "负责xx系统的后台实现,解决了上百规模下的并发场景优化"
                        ]
                    ),
                ),
                SectionEntry(
                    title=LinkText("淘宝", "https://www.taobao.com"),
                    caption="中级开发工程师",
                    location="广州",
                    dates="2020年8月 - 2022年5月",
                    description=BulletedList(
                        [
                            "负责手淘千人千面后台推荐算法的实现",
                        ]
                    ),
                ),
                SectionEntry(
                    title=LinkText("小米", "https://www.xiaomi.com"),
                    caption="初级开发工程师",
                    location="北京",
                    dates="2018年7月 - 2020年7月",
                    description=BulletedList(
                        [
                            "负责小米商城商品展示系统的开发和设计",
                        ]
                    )
                )
            ],
        ),
        Section(
            title="获得荣誉",
            entries=[
                SectionEntry(
                    title=LinkText(
                        "计算机二级证书", url="https://chennai.ashanet.org/", show_icon=True
                    ),
                    caption="计算机二级证书",
                    location="北京",
                    dates="2015年11月",
                    description=BulletedList(
                        [
                            " 全国计算机等级考试(National Computer Rank Examination,简称NCRE),是经原国家教育委员会(现教育部)批准,由教育部教育考试院(原教育部考试中心)主办,面向社会,用于考查应试人员计算机应用知识与技能的全国性计算机水平考试体系",
                        ]
                    ),
                )
            ],
        ),
        Section(
            title="教育经历",
            entries=[
                SectionEntry(
                    title="清花大学",
                    location="北京",
                    dates="2014年9月 - 2018年6月",
                    description=ItalicsText(
                        "电子信息工程"
                    ),
                )
            ],
        ),
        Section(
            title="掌握技能",
            entries=[
                SectionEntry(
                    description=BulletedList(
                        [
                            ConcatText(
                                UnderlinedText("语言:"),
                                " Python, Golang, C/C++, JavaScript, C#, Powershell, Zig",
                            ),
                            ConcatText(
                                UnderlinedText("工具:"),
                                " Kubernetes, PostgreSQL, Linux, Windows, Azure Service Fabric, Distributed Databases, Storage Engines, Docker",
                            ),
                        ]
                    )
                ),
            ],
        ),
    ]
)

if __name__ == "__main__":
    resume.cli_main()

结果预览

中文乱码解决

原版生成的html文件,中文出现乱码,只需要修改resume_builder.py文件中的save方法,增加encoding = "utf-8"即可实现中文支持:

    def save(self, filename: str) -> None:
        with open(filename, "w",encoding = "utf-8") as f:
            f.write(self.render())

作者:〖十月狐狸〗

出处:http://www.cnblogs.com/sesshoumaru/

欢迎任何形式的转载,但请务必注明出处。

本人水平有限,如果文章和代码有表述不当之处,还请不吝赐教。