The paper studied course knowledge graph in teaching resources and curriculum knowledge management tasks from the perspective of knowledge management. Considering that the course of Python Language Programming itself has formed a relatively complete knowledge system and knowledge point structure, the paper adopted a top-down approach to build the knowledge graph. Firstly, the paper obtained different types of course-related corpus and data from different sources, and then constructed the ontology layer of Python programming course. At the ontology level, the paper defined the concept type, relation type and attribute type of the course domain respectively. Considering the completeness of knowledge points in the curriculum domain knowledge graph, the paper extracted all entities, relationships, attributes, and its values from the curriculum corpus using a semi-automatic extraction method that takes into account both accuracy and efficiency based on the modeling results of the ontology layer. Then they were transformed into triples in the form of < entity, relationship, entity > or < entity, attribute, attribute value > to build data layer of knowledge graph. Finally, visualization of triplet data was realized through Neo4j graph database.