← 返回首页
python-gitlab/docs/gl_objects/wikis.rst at feat/graphql · python-gitlab/python-gitlab · GitHub
Skip to content

Navigation Menu

Toggle navigation
Sign in
Appearance settings
Search or jump to...

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Include my email address so I can be contacted

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Resetting focus

Latest commit

 

History

History
56 lines (34 loc) · 1.4 KB
 feat/graphql
Top

File metadata and controls

  • Preview
  • Code
  • Blame
56 lines (34 loc) · 1.4 KB

Wiki pages

References

Examples

Get the list of wiki pages for a project. These do not contain the contents of the wiki page. You will need to call get(slug) to retrieve the content by accessing the content attribute:

pages = project.wikis.list()

Get the list of wiki pages for a group. These do not contain the contents of the wiki page. You will need to call get(slug) to retrieve the content by accessing the content attribute:

pages = group.wikis.list()

Get a single wiki page for a project:

page = project.wikis.get(page_slug)

Get a single wiki page for a group:

page = group.wikis.get(page_slug)

Get the contents of a wiki page:

print(page.content)

Create a wiki page on a project level:

page = project.wikis.create({'title': 'Wiki Page 1', 'content': open(a_file).read()})

Update a wiki page:

page.content = 'My new content' page.save()

Delete a wiki page:

page.delete()

Footer

© 2026 GitHub, Inc.